Jump to content

Caveat: Alfred 2.0.3: NSAppleScript actions: `open location` requires "System Events" context

Recommended Posts

This may not be a bug, but it's worth noting:


When you use

open location


to open a URL from inside an NSAppleScript action, it must be in the tell application "System Events" context, otherwise it will fail silently (as of Alfred 2.0.3 on OS X 10.8.3).


For instance, to open URL "http://boston.com", you need to use the following:


tell application "System Events" to open location "http://boston.com"   # fails without `tell application "System Events" to`



If an action's sole purpose is to open a URL with the default handler, it is better to use the dedicated Open URL action type instead, which avoids this problem.


Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...