Copy link to clipboard
Copied
HI All,
I just need to get the list of actions available in the illustrator using javascript.
we only have the code to do the action using doScript() function, but i need to verify before run the action, the specific action loaded in my system or not. thats y i need the function to call all actions.
actionlist = app.actions; // its not working but this is the code i need, i want the list of actions
found = false;
Myaction ="OL_200";
for (i=0; i<actionlist.length; i++)
{
if(actionlist[i] == Myaction)
{
found = true;
}
}
if(found == true)
{
app.doScript(action="OL_200", from="Muthu_MS")
I once answered a similar question. If it is saved, you can get it from preferences.
Copy link to clipboard
Copied
Hello, I think this will be helpful
Copy link to clipboard
Copied
How about
// Pseudocode
Try {
// Run action
}
catch (e) {
// load action
$.sleep(500)
//Run action
}
Copy link to clipboard
Copied
Hi Muthu, there's no access to the Actions list.
Copy link to clipboard
Copied
Muthu,
usually all action sets that are listed in the Actions palette (unfortunately) are listed as plain text in the general Illustrator Preferences file.
Perhaps you may find a way to extract the desired infos from there.
Copy link to clipboard
Copied
I once answered a similar question. If it is saved, you can get it from preferences.
Copy link to clipboard
Copied
I forgot about your solution, thanks for reposting!
Copy link to clipboard
Copied
Thanks guys i got the solution now! its working...