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

Need to get list of Actions available in illustrator

Community Beginner ,
Jul 08, 2022 Jul 08, 2022

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.

Muthu5FC5_0-1657283677020.png

 


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
TOPICS
Scripting , Tools

Views

414

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

Community Expert , Jul 13, 2022 Jul 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?

Votes

Translate

Translate
Adobe
Community Expert ,
Jul 08, 2022 Jul 08, 2022

Copy link to clipboard

Copied

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 Expert ,
Jul 08, 2022 Jul 08, 2022

Copy link to clipboard

Copied

How about

// Pseudocode

Try {

// Run action

}

catch (e) {

// load action

$.sleep(500)

//Run action

}

 

 

 

 

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 Expert ,
Jul 08, 2022 Jul 08, 2022

Copy link to clipboard

Copied

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

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 Expert ,
Jul 08, 2022 Jul 08, 2022

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.

 

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 Expert ,
Jul 13, 2022 Jul 13, 2022

Copy link to clipboard

Copied

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

Get names of actions in some set?

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 Expert ,
Jul 13, 2022 Jul 13, 2022

Copy link to clipboard

Copied

I forgot about your solution, thanks for reposting!

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 ,
Jul 13, 2022 Jul 13, 2022

Copy link to clipboard

Copied

LATEST

Thanks guys i got the solution now! its working...

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