Skip to main content
Inspiring
Jun 11, 2020 1:32 PM UTC
Answered

app.doScript probem

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

This topic is closed to new replies. Start a new post to keep the conversation going.
Charu Rajput
Charu RajputCorrect answer
Community Expert
Jun 11, 2020 3:17 PM UTC

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

 

 

I am not sure but a similar problem like this.

  

Best regards

6 replies

Disposition_Dev
Legend
Jun 11, 2020 2:56 PM UTC

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");
Translate
Charu Rajput
Community Expert
Charu RajputCommunity ExpertCorrect answer
Community Expert
Jun 11, 2020 3:17 PM UTC

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

 

 

I am not sure but a similar problem like this.

  

Translate
Best regards
Disposition_Dev
Legend
Jun 11, 2020 4:35 PM UTC

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. 

Translate
Charu Rajput
Community Expert
Community Expert
Jun 11, 2020 2:19 PM UTC

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?

 

Translate
Best regards