Skip to main content
Participant
July 8, 2022
Answered

Need to get list of Actions available in illustrator

  • July 8, 2022
  • 5 replies
  • 729 views

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")

}
else
{
alert("Please load the action before run the script");
}

Thanks in advance
This topic has been closed for replies.
Correct answer sttk3

I once answered a similar question. If it is saved, you can get it from preferences.

Get names of actions in some set?

5 replies

sttk3Correct answer
Legend
July 13, 2022

I once answered a similar question. If it is saved, you can get it from preferences.

Get names of actions in some set?

CarlosCanto
Community Expert
Community Expert
July 13, 2022

I forgot about your solution, thanks for reposting!

Kurt Gold
Community Expert
Community Expert
July 8, 2022

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.

 

CarlosCanto
Community Expert
Community Expert
July 8, 2022

Hi Muthu, there's no access to the Actions list.

pixxxelschubser
Community Expert
Community Expert
July 8, 2022

How about

// Pseudocode

Try {

// Run action

}

catch (e) {

// load action

$.sleep(500)

//Run action

}

 

 

 

 

Community Expert
July 8, 2022