Copy link to clipboard
Copied
Hello,
Is there any easy ways to copy Width Height X and Y of a layer so I can apply it to other layer (as a replacement) on the same image
Any help and suggestion will be appreciated, Thank you
Update - 17th December 2022:
Here is a simplified 2 part script, replacing all previously posted code in this topic.
Select the source layer and run script 1 of 2:
/*
Resize Target Layer to Source Layer Size - 1 of 2.jsx
https://community.adobe.com/t5/photoshop-ecosystem-discussions/is-it-possible-to-copy-all-width-height-x-and-y-properties/td-p/13410970
v1.1, 17th December 2022, Stephen Marsh
*/
#target photoshop
if (documents.length) {
// Store the original ruler units and set to
...
Update - 19th December 2022:
/* The previous code using the $.setenv() code has been removed due to errors */
Here is a single OPT/ALT version of the updated two-part script:
/*
Resize Target Layer to Source Layer Size - ALT-OPT.jsx
https://community.adobe.com/t5/photoshop-ecosystem-discussions/is-it-possible-to-copy-all-width-height-x-and-y-properties/td-p/13410970
v1.1, 19th December 2022, Stephen Marsh
*/
#target photoshop
if (documents.length) {
/* Step 2 - Hold down alt/opt to
...
Copy link to clipboard
Copied
Ah, I mostly use a Mac, so well done!
The available options are:
/*
altKey readonly - True if the Alt or Option key is pressed.
ctrlKey readonly - True if the Ctrl key is pressed.
keyName readonly - A string containing the name of the currently pressed key, such as “a”, or an empty string.
metaKey readonly - True if the Cmd key (in Mac OS) or Windows key (in Windows) is pressed.
shiftKey readonly - True if the Shift key is pressed.
*/