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

Call javascript from vbscript (jsx inside vbs)

Explorer ,
Nov 12, 2008 Nov 12, 2008
Dear scripters,

I have two files

1. a.vbs

msgbox("This is Indesign Vbscript")

2. b.jsx

alert("This is Indesign Javascript")

I am placing a.vbs into the script panel, and it's working fine.

Now what I want to do is to call b.jsx from a.vbs.

How can I do this? thanks in advance

thanks

regards
a r u l
TOPICS
Scripting
2.0K
Translate
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
Valorous Hero ,
Nov 13, 2008 Nov 13, 2008
See DoScriptParameters.vbs example in indesign cs3 guide scripts.

Kasyan
Translate
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
Explorer ,
Nov 13, 2008 Nov 13, 2008
Hi Kasyan

thanks for your reply I am working with cs2 windows xp, DoScript will support to CS2?

thanks

regards
a r u l
Translate
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
Valorous Hero ,
Nov 13, 2008 Nov 13, 2008
Yes, you can run a JS script from VB script using DoScript method in CS2, but you can't send parameters and return values as in CS3.
Translate
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
Explorer ,
Nov 13, 2008 Nov 13, 2008
Hi kasyan

here is my script

a.vbs

Set myInDesign = CreateObject("InDesign.Application.CS2")
Msgbox("This message from Vbscript")

myJavaScript = "C:\Program Files\Adobe\Adobe InDesign CS2\Presets\Scripts\b.jsx"

myInDesign.DoScript myJavaScript

is this syntax is correct? I am getting error "Incompatible or unsupported scripting language"

where I am mistaken?
Translate
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
Explorer ,
Nov 13, 2008 Nov 13, 2008
LATEST
Hi Kasyan

thank you so much for your suggesion I missed this line

myInDesign.DoScript myJavaScript, idScriptLanguage.idJavaScript

now Its working perfect

thanks a lot

regards
a r u l
Translate
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