• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Is it possible to copy all Width Height, X and Y properties?

Explorer ,
Dec 10, 2022 Dec 10, 2022

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

 

01.jpg

 

Any help and suggestion will be appreciated, Thank you

TOPICS
Actions and scripting , Windows

Views

3.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Community Expert , Dec 11, 2022 Dec 11, 2022

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 
...

Votes

Translate

Translate
Community Expert , Dec 11, 2022 Dec 11, 2022

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 
...

Votes

Translate

Translate
Adobe
Community Expert ,
Dec 18, 2022 Dec 18, 2022

Copy link to clipboard

Copied

LATEST

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.
*/

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines