def runJSX (aFilePath ): id60 = psApp.stringIDToTypeID ( "AdobeScriptAutomation Scripts" ) desc12 = comtypes.client.CreateObject('Photoshop.ActionDescriptor') id61 = psApp.charIDToTypeID( "jsCt" ) desc12.putPath( id61, aFilePath ) id62 = psApp.charIDToTypeID( "jsMs" ) desc12.putString( id62, "null" ) psApp.executeAction( id60, desc12, 2 ) psApp = comtypes.client.CreateObject('Photoshop.Application') runJSX ( "C:\\OpenDocument.jsx" )