Skip to main content
Inspiring
June 11, 2020
Answered

app.doScript probem

  • June 11, 2020
  • 2 replies
  • 1432 views

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 has been closed for replies.
Correct answer Charu Rajput

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.

  

2 replies

Disposition_Dev
Legend
June 11, 2020

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");
Charu Rajput
Community Expert
Charu RajputCommunity ExpertCorrect answer
Community Expert
June 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

 

 

I am not sure but a similar problem like this.

  

Best regards
Disposition_Dev
Legend
June 11, 2020

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. 

Charu Rajput
Community Expert
Community Expert
June 11, 2020

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