Coding mac shell script to call .JSX function for PS script

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

worldveil

Coding mac shell script to call .JSX function for PS script

Post by worldveil »

How would I do this? I basically want to be able to code opening PS then calling this script by passing in a parameter for the file name and image size, then have the script go to it. any ideas on how to do this? thanks.

Professional AI Audio Generation within Adobe Premiere Pro - Download Free Plugin here

txuku

Coding mac shell script to call .JSX function for PS script

Post by txuku »

Hello worldveil

Maybe a vb script to call your apple script like this ?

Code: Select allDIM objApp
SET objApp = CreateObject("Photoshop.Application")
REM Use dialog mode 3 for show no dialogs
DIM dialogMode
dialogMode = 3
DIM idAdobeScriptAutomationScripts
idAdobeScriptAutomationScripts = objApp.StringIDToTypeID( "AdobeScriptAutomation Scripts" )
    DIM desc1
    SET desc1 = CreateObject( "Photoshop.ActionDescriptor" )
    DIM idjsCt
    idjsCt = objApp.CharIDToTypeID( "jsCt" )
    Call desc1.PutPath( idjsCt, "C:/Users/moi/Documents/JAVA_SCRIPT_W/SIMPLIFIES/Split3.jsx" )// your script .jsx our apple script
    DIM idjsMs
    idjsMs = objApp.CharIDToTypeID( "jsMs" )
    Call desc1.PutString( idjsMs, "undefined" )
Call objApp.ExecuteAction( idAdobeScriptAutomationScripts, desc1, dialogMode )