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

app.doScript probem

Contributor ,
Jun 11, 2020 Jun 11, 2020

Copy link to clipboard

Copied

Hi,

 

I have recorded an action to be called from a jsx file ... so it is currently in the actions panel.

Now, if I click "play", it works. If I call app.doScript("myaction", "myscriptlib") instead, I get a message that "play action" is not currently available

TOPICS
Scripting

Views

969

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 , Jun 11, 2020 Jun 11, 2020

Well, I suppose order is as below

app.doScript([Name of the action], [Name of the set where action stored]);

 

What I think the problem is, birnerseff is running the action for which it is not recorded. For an example. Record an action for ungroup, but run this action on an item which is not group, then this will give an alert as below

 

Screenshot 2020-06-11 at 8.45.57 PM.png

 

I am not sure but a similar problem like this.

  

Votes

Translate

Translate
Adobe
Community Expert ,
Jun 11, 2020 Jun 11, 2020

Copy link to clipboard

Copied

Hi,

Could you please share the screen shot for the Action panel that you would like to execute from the script and what exactly your action do?

 

Best regards

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 ,
Jun 11, 2020 Jun 11, 2020

Copy link to clipboard

Copied

Try reversing the arguments in your app.doScript() call. I can never remember the correct order, so i always have to tinker with it. try this:

app.doScript("myscriptlib","myaction");

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 ,
Jun 11, 2020 Jun 11, 2020

Copy link to clipboard

Copied

Well, I suppose order is as below

app.doScript([Name of the action], [Name of the set where action stored]);

 

What I think the problem is, birnerseff is running the action for which it is not recorded. For an example. Record an action for ungroup, but run this action on an item which is not group, then this will give an alert as below

 

Screenshot 2020-06-11 at 8.45.57 PM.png

 

I am not sure but a similar problem like this.

  

Best regards

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 ,
Jun 11, 2020 Jun 11, 2020

Copy link to clipboard

Copied

That could be the problem.. But they said the error message said "play action is not currently available".

 

The only time i see this message is when there is no action (or set) in the actions panel matching the given arguments. If the action does indeed start running, then it's likely there'd be a more specific error message like the one you've shown. 

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 ,
Jun 11, 2020 Jun 11, 2020

Copy link to clipboard

Copied

Yes, that may also be the case.

I got your point now may be birnerseff using action name as set name and vice versa.

Best regards

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
Contributor ,
Jun 11, 2020 Jun 11, 2020

Copy link to clipboard

Copied

LATEST

Hi,

 

many thanks for the quick response.

Well, I double-checked the spelling,verified on another script that deliberately isspelling either the action name or the set name cause that message, and then ... just started over in a fresh instance of illustrator.

The only thing I did differently: the old action names included a - (minus), this tieI used an underscoree.

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