Skip to main content
ChristianK-Fr
Inspiring
April 9, 2020
Question

run a .jsx file in a droplet : howto?

  • April 9, 2020
  • 2 replies
  • 1262 views

Hi all, 

Is there a way to run a javascript file into a droplet ? Have made a .jsx file for select path and fill background with a specific color. And I want to made droplet the I could select variables folders, drop it on the droplet then run the .jsx file (that allow me to have conditions in it for ex. check the path name, if exist or not).

I try to record an action and go to browse script file, but it didn't record it.....

Best Regards, and thanks in advance,

Christian

This topic has been closed for replies.

2 replies

Stephen Marsh
Community Expert
Community Expert
April 10, 2020

I just tried with a browsed script recorded into an action and the droplet worked.

 

Are you using the droplet on another computer or user account where the recorded explicit/absolute browse path differs? Using an installed script would overcome this issue as there is no path recorded, it is just the script name.

 

Does the action work using the Batch command?

 

You may need to show screenshots of the droplet settings and or share the script code or more details to pinpoint why this breaks.

Participant
December 2, 2021

I can't figure out how to make it work either way... I'm not sure if I'm setting it up right? The action to run the script will work, whether I install the script into photoshop or not... but nothing I do with the droplet will get the script to run.

 

The script I'm running is to run another script ... i wouldnt mind being able to put the code or path in as a variable but I cant get it to work at all... this is the code my action is running currently...

 

// =======================================================
var idAdobeScriptAutomationScripts = stringIDToTypeID( "AdobeScriptAutomation Scripts" );
    var desc2 = new ActionDescriptor();
    var idjsCt = charIDToTypeID( "jsCt" );
    desc2.putPath( idjsCt, new File( "C:\\Users\\Ivan\\OneDrive\\AppDevelopment\\Javascript\\ExtendScript\\InputFolder\\runScript.photoshop.jsx" ) );
    var idjsMs = charIDToTypeID( "jsMs" );
    desc2.putString( idjsMs, """true""" );
executeAction( idAdobeScriptAutomationScripts, desc2, DialogModes.NO );

 

I've also tried all sorts of combinations with this gui... 

 

 

Stephen Marsh
Community Expert
Community Expert
December 2, 2021

You have an explicit path in the script, will that break on a different PC or is that for the PC running the droplet?

 

What about a screenshot of the action, does it have a script path or just the script name? Can you show a screenshot with the action step expanded for at least the script step, if not others?

 

An action can run an installed script, so you may find it easier to install the scripts on all computers then record the script call using only the installed script name in the action/droplet.

Stephen Marsh
Community Expert
Community Expert
April 10, 2020

Why not try with an installed script, rather than one that was browsed?

 

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html