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

Call Exe file from InDesign using Java Script

New Here ,
Sep 29, 2008 Sep 29, 2008
Hi All,

I have write one script file to run exe file. But I got error "ActiveXObject does not have constructor". Please anyone advice me why showing this error.

My Script
=========

MyObject = new ActiveXObject( "WScript.Shell" )

MyObject.Run("file:///C:/Program Files/Eps10/bin/epsilon.exe");


I would like thankful to help this.

Thanks
Byomokesh
TOPICS
Scripting
2.7K
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 ,
Sep 29, 2008 Sep 29, 2008
Hi Byomokesh--

What you have posted is VBScript, not JavaScript. JavaScript--at least ExtendScript, the flavor of JavaScript used by InDesign--does not know anything about ActiveXObjects.

But you can use the execute method to run a file. Something like this (this is JavaScript):

var myFile = File("/c/Program Files/Microsoft Office/Visio11/Visio.exe");
myFile.execute();

Thanks,

Ole
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
New Here ,
Sep 30, 2008 Sep 30, 2008
Thanks Ole,
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
New Here ,
Sep 30, 2008 Sep 30, 2008
Hi Ole,

I am struggling some issue. That exe file is to converting .xml to .txt files. I want that txt file is come automatically in InDesign Document.

I have tried that but i m struggling how i catch that .txt (file name) usign jaga script. I m using ID CS3 (WIN). InDesign has only import XML (myDocument.importXML) but how i ll call import this TXT file.

Thanks
Byomokesh
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
New Here ,
Sep 30, 2008 Sep 30, 2008
LATEST
Yes I got

thanks
Byomokesh
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