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

Open script in ESTK by using a script.

Valorous Hero ,
Jan 31, 2015 Jan 31, 2015

I am trying to make a command to open a chosen .jsx file inside the ESTK.  I was trying to make an applescript string to be written and immediately executed with file.execute() (.scpt extension), but my file.execute() just opens the string up in an applescript editor, which I can compile and run from the editor and the script does work (sort of*).  *meaning, it pops up the trust dialog if there's a #target illustrator in the document.

Anyways, I was looking to do the exact same thing as a Windows counterpart which I've already tested, where a .vbs file constructed thus, would work exactly as desired, opening up a .jsx file in the ESTK by doing a shell script object command in the .vbs.

TOPICS
Scripting
596
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 ,
Feb 01, 2015 Feb 01, 2015
LATEST

I was able to create the next-best-thing , which is a bundled .app applescript file, saved from an applescript editor, which I put to live in the application scripts folder.  The .app file is like .jsx or .vbs files because it will work when double-clicked, or performed file.execute() on.  That file is set up to run a .scpt file of a constant name, which I write into the same folder, so by changing the contents of my .scpt file, this more awkward system is a bit more helpful on the Mac.  The problems are that the warning yes/no dialog box pops up for files with "#target" in them, and that scripts sitting inside the Adobe Scripts folder do not even open. This is the applescript example:

do shell script "open -a \"ExtendScript Toolkit\" \"/Users/me/myFile.jsx\""

There's probably a much better way to do this, is there?

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