Hi Rob Thanks for replying. > Which editor are you using? XCode (3.1) actually. > Some examples are given in 6.1 of the R OS X FAQ. I say that. But since I'm (very) new to AppleScript, I don't know how to make it use a highlighted piece of code instead. Regards, Gregor.