AppleScript utilities