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

run a .jsx file in a droplet : howto?

Participant ,
Apr 09, 2020 Apr 09, 2020

Copy link to clipboard

Copied

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

TOPICS
Actions and scripting

Views

936

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
Adobe
Community Expert ,
Apr 09, 2020 Apr 09, 2020

Copy link to clipboard

Copied

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

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 ,
Apr 09, 2020 Apr 09, 2020

Copy link to clipboard

Copied

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.

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
New Here ,
Dec 01, 2021 Dec 01, 2021

Copy link to clipboard

Copied

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

 

Ivan22042869e9jy_0-1638404719047.png

 

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 ,
Dec 01, 2021 Dec 01, 2021

Copy link to clipboard

Copied

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.

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
New Here ,
Dec 03, 2021 Dec 03, 2021

Copy link to clipboard

Copied

I wound up figuring out how to run the script with VBScript instead of going the droplets route... thanks though!!

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
New Here ,
Sep 12, 2024 Sep 12, 2024

Copy link to clipboard

Copied

LATEST

How? Please . Im on the same road

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