Highlighted

app.doScript probem

Contributor ,
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

Adobe Community Professional
Correct answer by Charu Rajput | Adobe Community Professional

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.

  

Topics

Scripting

Views

414

Likes

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

app.doScript probem

Contributor ,
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

Adobe Community Professional
Correct answer by Charu Rajput | Adobe Community Professional

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.

  

Topics

Scripting

Views

415

Likes

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
Adobe Community Professional ,
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

Likes

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
Reply
Loading...
Adobe Community Professional ,
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");

Likes

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
Reply
Loading...
Adobe Community Professional ,
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

Likes

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
Reply
Loading...
Adobe Community Professional ,
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. 

Likes

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
Reply
Loading...
Adobe Community Professional ,
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

Likes

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

Copy link to clipboard

Copied

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.

Likes

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
Reply
Loading...