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

script to move and copy an object with opacity mask

Community Beginner ,
Aug 09, 2017 Aug 09, 2017

Copy link to clipboard

Copied

I have script which can help me to move and copy an object, but I just found that it can not copy the object with opacity mask.

it is there anyone have any idea to solve this problem.

maybe we can used adobe action, but it only can copy 1 time, however, usually  we need copy more than 10 times..

function dup(sel,item,qty,tran1,tran2){ 

  for (var i=0; i<[qty]; i++){ 

  sel[item].duplicate(); 

  sel[item].translate(tran1,tran2); 

  }

TOPICS
Scripting

Views

1.8K

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 1 Correct answer

Valorous Hero , Aug 10, 2017 Aug 10, 2017

Sorry to say, but this can be done in a way that is not so easy: it can be done with a dynamic action. See this thread: Creating a dynamic action to use with app.doScript() method.

Simply put, opacity masks do move when used with the regular Move dialog (ctrl + shift + M), and when a move action is recorded and played back. With a script you can write your own move action by placing your own numbers where the numbers would go. You do this by recording a couple instances of the manual action move

...

Votes

Translate

Translate
Adobe
Valorous Hero ,
Aug 10, 2017 Aug 10, 2017

Copy link to clipboard

Copied

Sorry to say, but this can be done in a way that is not so easy: it can be done with a dynamic action. See this thread: Creating a dynamic action to use with app.doScript() method.

Simply put, opacity masks do move when used with the regular Move dialog (ctrl + shift + M), and when a move action is recorded and played back. With a script you can write your own move action by placing your own numbers where the numbers would go. You do this by recording a couple instances of the manual action move command with different parameters in the dialog. By analyzing the differences in the .aia files, you can tell which part corresponds with the various parameters you need.

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
Enthusiast ,
Aug 11, 2017 Aug 11, 2017

Copy link to clipboard

Copied

Other methods:

  • Create a symbol from the object, then copy/move the symbol item
  • Apply a transform effect, then expand the effect
  • Copy, change center of view to desired position, paste
  • ...

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
Community Beginner ,
Sep 11, 2017 Sep 11, 2017

Copy link to clipboard

Copied

LATEST

thanks all,  both of your methods is helpful for me. the action method and transform effect are great.

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