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);
}
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
...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.
Copy link to clipboard
Copied
Other methods:
Copy link to clipboard
Copied
thanks all, both of your methods is helpful for me. the action method and transform effect are great.