Skip Navigation

Trying Smile

I’ve wanted to try Smile (the AppleScript editor) for a while now. Many people like it a lot because it offers some unique features, but every time I tried it, I gave up in frustration. I just didn’t “get” it. At the time, it didn’t really matter, because I have always been a very satisfied user of Script Debugger. The most recent version I own is 2, however, and since I haven’t been doing much scripting in recent years, I didn’t feel justified spending the money to upgrade to version 3. My needs were met by using Script Editor. I wasn’t happy about it, but I could get by. With some scripting projects to do, I took the opportunity to give Smile (2.5.9) another chance. After all, there was no risk involved—Smile is free!

I was pleased to find out that Smile is really cool, but I felt that the documentation (which consists of a Getting Started PDF and a few paragraphs of online help) was rather skimpy. I can see why I was frustrated. Herewith, then, are some notes to myself on using Smile.

My first project involved opening a script saved as text into a Smile “Text” window. “Text” windows are a unique feature of Smile. In a Text window, hitting the Enter key executes the current line or the selection (compiling first if necessary) instead of running the whole script top to bottom as would normally occur in other editors (or a Smile “Script” window). I’m sure this works fine for writing a script from scratch a line at a time—but I was starting with uncompiled text

When you reach a line containing a call to a handler later on in your script, you will get the error that <<script>> doesn’t understand the <<handler name>> message. That’s because the handler hasn’t been compiled yet. To fix this, select the handler and hit Enter to compile it. Another problem with “Enter-stepping” is that Smile can’t step through any part of a code block (examples: try, end try, with timeout, end timeout, if, end if, multi-line comment, etc.) unless the line is a complete statement, so every time you reach a block, hitting Enter throws an error. To get around this limitation, you need to select the entire block and run it as a unit. Even with these annoyances, I’ve discovered that Smile has a lot of potential, although from reading these criticisms, you’re probably wondering where it is!

Comment on “Trying Smile”

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)