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

Call python script from adobe indesign script (Extended Script)

Explorer ,
Jun 21, 2022 Jun 21, 2022

HI,

I have python script which i want execute the script from Adobe indesign Javascript (Extended Script) CC20. It should be in MAC

1.2K
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
Community Expert ,
Jun 22, 2022 Jun 22, 2022

Hi @$rikanth,

You could create a shell script file containing the command to execute your python script and then call this shell script file using the File objects execute method.

-Manan

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 ,
Jun 23, 2022 Jun 23, 2022

Thanks Manan,

But i want elxecute from MAC machine!

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
Community Expert ,
Jun 23, 2022 Jun 23, 2022

Shell scripts excute on a MAC, what's the problem here?

-Manan

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
Community Expert ,
Jun 24, 2022 Jun 24, 2022

Hi $rikanth,

you asked this also in another thread and gave a code sample.

I asked some questions there.

 

Where do you want to execute the ExtendScript code part from?

Is it the User folder of your Scripts panel in InDesign?

 

Where is the Python script file positioned in your file system?

Could you execute it with a double-click?

 

Regards,
Uwe Laubender
( Adobe Community Professional )

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
Community Expert ,
Jun 24, 2022 Jun 24, 2022
LATEST

Here the link to this other thread that is related:

Run External script from indesign javascript
$rikanth, Jun 22, 2022

https://community.adobe.com/t5/indesign-discussions/run-external-script-from-indesign-javascript/td-...

 

My question about the Python script's position in the file system is answered.

You tried to run the script with ExtendScript's file.execute() method when the file is on the desktop.

In my experience this is analog to a double-click on the file.

 

So: Does it work with a double-click to execute the file?

Quoting your code from this other thread:

var myJavaScriptFile = new File("~/Desktop/websterdict.py");
myJavaScriptFile.execute();

 

Regards,
Uwe Laubender
( Adobe Community Professional )

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