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`

 

Note:

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.

 

Link to comment
  • 5 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...