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

how to execute applescript .scpt from Javascript

New Here ,
Oct 11, 2018 Oct 11, 2018

I have put 'do shell script' to my .scpt which should run after the Javascript. Here, .scpt will be changed per file where I can't make that as '.app' to execute as application.

Also kindly help me to load the scripts in File>Scripts>OtherScripts without user interaction from Javascript.

TOPICS
Scripting
753
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
Adobe
Valorous Hero ,
Oct 11, 2018 Oct 11, 2018
LATEST

I'm not sure if a javascript can install the script into the application folder without some kind of user permission interaction. Although , I have never tested this out as of yet.

In order to run applescript from javascript, I've had to make an "AppleScript-Executor.app" .app which can be triggered by jsx's file.execute() method. If this app's code tells it to always run a .scpt file in a certain location, you can write the .scpt dynamically from the jsx and execute the .app which would run it. For cleanup, the .app could remove the file too.

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