Script opens in editor instead of running?

Brand new user, and I'm trying to run my first script. It's JavaScript that's supposed to execute in Illustrator, but when I try to run the script via FastScripts it opens the script in my script editor (TextWrangler) instead of executing the script.

The script shouldn't be broken, because when I try to run it through the Illustrator menu it works perfectly.

FastScripts is "scripting language agnostic", but I can't find anything confirming nor denying that it works with JavaScript. Is JavaScript the issue?

Additional details: I'm on Mac OS 10.9.1, Illustrator CS6.

Thanks in advance!

Comments

Hi there - FastScripts will run a variety of scripting languages, but only if the scripts are either AppleScript or will run as standalone scripts on the command line (e.g. a scripting language like perl, python, sh, bash, etc that can be invoked from the command line). Unfortunately for this kind of JavaScript-based script that is especially suited to Illustrator, it might not fit the bill.

Since FastScripts is running the script outside of the targeted app, it has to be able to make sense of the script independently of the app.

That said, I wouldn't be surprised if the JavaScript code could be packed up into an AppleScript that asks Illustrator to run the JavaScript. Do you have any experience with writing AppleScripts for Illustrator? I am wondering if it supports an AppleScript command like "do javascript" that would be useful for running arbitrary scripts from outside the app.

-- pr_options.scpt or other names (like - pr_options.sh), sounds so-oh sweet!-- How about a (do shell script) solution....-- Imagine other (753 here on my mac) commands at the unix command line expanding your MarsEdit -- capabilities, like this BASH offering, below. Written in this manner to run as an-- Applescript .scpt file. ---- English can be listened to by a French man.