Copy link to clipboard
Copied
Greeting all,
What I am trying to do is to force InDesign to open a jsx file directly. It seems not working either using command line tool or opening jsx file directly. The error message is captured as below image.
Can anyone please advise the best way to trigger a script file from command line? The reason to do so is that the jsx file is generated dynamically by hardware.
Thanks in advance!
Best,
Hugo
1 Correct answer
Try this,
This is command line argument,
wscript.exe D:\SunilY\Test\vbScript.vbs
This is my vbScript.vbs
Set myInDesign = CreateObject("InDesign.Application.CC.2017")
dim myArray, myString
myTestJavaScript = "D:\SunilY\Test\test.jsx"
myInDesign.DoScript myJavaScript, 1246973031
Copy link to clipboard
Copied
Ask in the InDesign Scripting forum. I'll move your messge there now.
Copy link to clipboard
Copied
You can't just open .jsx file into indesign application. If you want to execute jsx, you can call jsx from vb script, and call that vbscript from command line.
Copy link to clipboard
Copied
Try this,
This is command line argument,
wscript.exe D:\SunilY\Test\vbScript.vbs
This is my vbScript.vbs
Set myInDesign = CreateObject("InDesign.Application.CC.2017")
dim myArray, myString
myTestJavaScript = "D:\SunilY\Test\test.jsx"
myInDesign.DoScript myJavaScript, 1246973031
Copy link to clipboard
Copied
Thanks! It works like a charm!
Copy link to clipboard
Copied
Saved my life
Copy link to clipboard
Copied
What is 1246973031 in the VBScript?
Copy link to clipboard
Copied
What is 1246973031 in the VBScript?
By Sohum21815629kzif
It's enumeration — the 2-nd parameter of the DoScript command — Language: the language of the script to execute.
This number is equivalent to idJavascript.
Copy link to clipboard
Copied
where can we get that wscript.exe
Copy link to clipboard
Copied
Hello, can I ask for one more thing?
How can I do if my .jsx need to pass agurments? And I still can't find the solution for this
Copy link to clipboard
Copied

