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

Need to get list of Actions available in illustrator

Community Beginner ,
Jul 08, 2022 Jul 08, 2022

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
647
Translate
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

Enthusiast , 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?

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

How about

// Pseudocode

Try {

// Run action

}

catch (e) {

// load action

$.sleep(500)

//Run action

}

 

 

 

 

Translate
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

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

Translate
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

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.

 

Translate
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
Enthusiast ,
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?

Translate
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

I forgot about your solution, thanks for reposting!

Translate
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
LATEST

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

Translate
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