Clicking Preview Button on an alias to an applescript

Not sure if this is a bug or an oversight or even something on my system, but, with debugging on I’m stepping through a script, and after executing a command that returns the path to an appleScript as an alias:

set x to myScriptFile as alias

The resources window displays: an HFS/POSIX/Finder button; a preview button (eyeball) and a show in Finder button (finder icon). (all this is very nifty, BTW)

If you click on the preview button, a preview window opens. The button in the preview window gives you the option to: “Open with Script Editor” and clicking the button does indeed open the script in Script Editor.

I would much rather “Open with Script Debugger”

What you’re seeing is QuickLook in action. If it’s offering you Script Editor, it means that you either don’t have Script Debugger as the default editor for scripts (Preferences -> General), or Script Editor has been set at the file’s editor in a Finder Get Info dialog. (Or QuickLook is misbehaving, I guess.)

It was my system.

I was seeing this behavior only in scripts that were saved as text with .applescript as the file extension. Get info showed me that they were set to open in SE. .scpt and .scptd files were set to open in debugger. Changing that setting in finder gave me the open with Script Debugger button.


With applets the button in the preview window reads "Open " using the actual name of the applet. For this one I would also prefer, if possible, the option to open in SD. But I’m guessing that since this uses the Finder’s setting, that’s probably not an option.

What you’re seeing is the same as hitting the spacebar with a file selected in the Finder – what QuickLook chooses to do is out of Script Debugger’s control.

1 Like