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

execute javascript with apple script in INDD photoshop

Explorer ,
Oct 09, 2014 Oct 09, 2014

Copy link to clipboard

Copied

Hi all,

I try to execute a javascript file with applescript by this way:

-- works in indesign

tell application "Adobe InDesign CC 2014"

    activate

    do script "Macintosh HD:Applications:MAMP:htdocs:extendscript-library.org:tests:test:fixtures:helper:log:test_log.jsx" language javascript

end tell

-- works in photoshop

tell application "Adobe Photoshop CC 2014"

    (activate) & (do javascript file "/Applications/MAMP/htdocs/extendscript-library.org/tests/test/fixtures/helper/log/test_log.jsx")

end tell

-- but why this script does't work

tell application "Adobe Photoshop CC 2014"

    activate

    do script "Macintosh HD:Applications:MAMP:htdocs:extendscript-library.org:tests:test:fixtures:helper:log:test_log.jsx" language javascript

end tell

The test_log.jsx content just an alert : alert('test');

I don't understand why the syntax is different if I call Photoshop or Indesign.

I would like to do someting like this:

-- works in photoshop

tell application "Adobe Photoshop CC 2014"

    (activate) & (do javascript file "/Applications/MAMP/htdocs/extendscript-library.org/tests/test/fixtures/helper/log/test_log.jsx")

end tell

-- works in photoshop

tell application "Adobe InDesign CC 2014"

    (activate) & (do javascript file "/Applications/MAMP/htdocs/extendscript-library.org/tests/test/fixtures/helper/log/test_log.jsx")

end tell

Thanks you for your help!

Have a nice day!

TOPICS
Scripting

Views

1.5K

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 ,
Oct 10, 2014 Oct 10, 2014

Copy link to clipboard

Copied

LATEST

Hi all, I was continuing to search a best way and I found this:

tell application "Adobe InDesign CS6"

    activate

    do script "Macintosh HD:Applications:MAMP:htdocs:extendscript-library.org:tests:test:fixtures:helper:log:test_log.jsx" with arguments {1, 2} language javascript

end tell

tell application "Adobe Photoshop CC 2014"

    activate

    do javascript file "Macintosh HD:Applications:MAMP:htdocs:extendscript-library.org:tests:test:fixtures:helper:log:test_log.jsx" with arguments {1, 2}

end tell

tell application "Adobe Illustrator"

    activate

    do javascript file "Macintosh HD:Applications:MAMP:htdocs:extendscript-library.org:tests:test:fixtures:helper:log:test_log.jsx" with arguments {1, 2}

end tell

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