Skip to content

Instantly share code, notes, and snippets.

@mfilej
Created January 16, 2012 10:13
Show Gist options
  • Save mfilej/1620117 to your computer and use it in GitHub Desktop.
Save mfilej/1620117 to your computer and use it in GitHub Desktop.
Make Safari open links from other applications in current space
on open location theURL
tell application "System Events"
if (count of windows of process "Safari") = 0 then tell application "Safari" to make new document
end tell
tell application "Safari" to open location theURL
end open location
<key>CFBundleIdentifier</key>
<string>com.apple.AppleScript.SafariURLHelper</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>SafariURLHelper</string>
<key>CFBundleURLSchemes</key>
<array>
<string>http</string>
<string>https</string>
</array>
</dict>
</array>
<key>NSUIElement</key>
<true/>
@mfilej
Copy link
Author

mfilej commented Jul 12, 2019

Hi @jasondm007, unfortunately I don't know how to achieve that. I also stopped using the script because it was a bit unreliable.

@jasondm007
Copy link

Hi @mfilej - Thanks for getting back to me.

No problem. I'll keep poking around, and let you know if I find a better solution. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment