I can't say that's the issue but backslashes can be escaping characters so once interpreted it can be read as
"D:*rogram Files (x86)*dobeAdobe InDesign CC 2015*cripts*cripts PanelTest.jsx"
* means any interpretation of escape the following character.
Use this instead:
D:\\Program Files (x86)\\Adobe\\Adobe InDesign CC 2015\\Scripts\\Scripts Panel\\Test.jsx"
In clear english, escape the escaping character…
this is not VB.
Your code is VB, it creates a String of the file name.
Escape them as stated by Loic.Aigon
"D:\\Program Files (x86)\\Adobe\\Adobe InDesign CC 2015\\Scripts\\Scripts Panel\\Test.jsx"
or revers them
"D:/Program Files (x86)/Adobe/Adobe InDesign CC 2015/Scripts/Scripts Panel/Test.jsx"
both will work.
Set myInDesign = CreateObject("InDesign.Application.CC2015")
Set myInDesign = CreateObject("InDesign.Application.CC.2015")
Nope, I'm not sorry.
However escaping it does not cause harm neither does using / instead of \.
In summary all 3 methods work here.
Thanks for reply. I tried all possibilities but the error comes as follows. I am new to VB script. help me.
But the applescript not execute in windows system so I tried in VB script.
set aScriptPath to "Applications:Adobe InDesign CC 2015:Scripts:Scripts Panel:Test:Test.jsxbin"
set pScriptPath to POSIX path of aScriptPath --"/Applications/Adobe InDesign CC 2015/Scripts/Scripts Panel/Test/Test.jsxbin"
tell application "Adobe InDesign CS6"
Please help me.
Thanks in Advance,
Here's a working example:
Also, you can reference the application without specifying the version like so:
Set myInDesign = CreateObject("InDesign.Application")
I get it called from VBS:
Hope this helps.
Here's a more elegant solution: both scripts should be located in the same folder -- JS and VBS. The latter uses the ActiveScript property to figure out the path to the folder with the scripts.
Looks like there's something wrong with the path Mahesh is using.
pathToMyFile = "C:\Path\to\the\file" ' change to the correct path Msgbox("VB says - File exists: " & CreateObject("Scripting.FileSystemObject").FileExists(pathToMyFile)) CreateObject("InDesign.Application.CC.2015").DoScript "alert(""Hi From InDesign"")", 1246973031
If the path is false then you know your problems nothing to do with ID
If you get "Hi From InDesign" then you know you are communicating good with ID
My turn to say sorry,
Did you not get this working?