Copy link to clipboard
Copied
I have a number of different actions I run, all based around Artboard 1. I'm not to familiar with scripting but it seems like there should be a script that can do the following (that I can then tie to a keyboard shortcut):
1. Make Artboard 1 active
2. Play the currently selected action (there is a button to do this in the Actions panel).
If anyone has done this or knows how to do it any help would be greatly appreciated.
Copy link to clipboard
Copied
Discussion moved to Illustrator Scripting​
Copy link to clipboard
Copied
Hi,
Here is the small script that can help you to make Artboard 1 as active artboard and call your action.
function main() {
var doc = app.activeDocument;
// Make Artboard 1 as active
for (i = 0; i < doc.artboards.length; i++) {
if (doc.artboards.name == 'Artboard 1') {
doc.artboards.setActiveArtboardIndex(i);
break;
}
}
// call your action - rename accordingly
app.doScript('Rotate Dialog (selection)', 'Default Actions');
}
main()
In the above script
'Default Actions' - name of set where actions exists
'Rotate Dialog (selection)' - name of the action.
Please change these two things as per your requirement.
Hope this heps you.
Regads
Charu
Copy link to clipboard
Copied
Charu,
Thanks for the script!
However, do the number of different actions I apply I'm really trying to get the second part of the script to Play the currently selected action (like the button on the bottom of the actions panel). Do you know if that is possible?
Thanks,
Jake
Copy link to clipboard
Copied
no I don't think that's possible, I recorded an action to play currently selected action but it hard coded that specific action.
is there a significant gain automating playing the selected action? you would have to select the action manually anyway
Copy link to clipboard
Copied
Thanks for trying it!
It probably doesn't save that much time, but with the amount of times per day I end up running the actions I thought it would be helpful to be able to just click the action and press a shortcut key to select artboard 1 and run the action. But I suppose if I just set the keyboard shortcut to select artboard 1 then click the play action button it will still be faster than what I am doing now.
Copy link to clipboard
Copied
or, you could incorporate "select artboard 1" action into all of your actions, that way you would only have to use 1 key combo.
Copy link to clipboard
Copied
Can i Select 2 Artboard to make theme active then play my action
Copy link to clipboard
Copied
You can select or draw a rectangle and find a way to make sure that rectangle is on top of the artboard you want. Then convert the rectangle into an artboard so now you have an active artboard in the same location as your desired active artboard. So in essence you have 2 artboards on top of each other. Maybe that could suffice, but you still would need to run some script to delete extra artboards at the end.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now