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

Call Exe file from InDesign using Java Script

New Here ,
Sep 29, 2008 Sep 29, 2008

Copy link to clipboard

Copied

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

Views

2.6K

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Thanks Ole,

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST
Yes I got

thanks
Byomokesh

Votes

Translate

Translate

Report

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