Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on open location the_url
- tell application "System Events"
- set the_apps to the name of every process whose visible is true
- set browser_apps to {"Google Chrome", "FirefoxDeveloperEdition", "Safari"}
- repeat with the_app in browser_apps
- if the_app is in the_apps then
- my openURL(the_url, the_app)
- return
- end if
- end repeat
- my openURL(the_url, item 1 of browser_apps)
- end tell
- end open location
- on openURL(the_url, the_app)
- tell application the_app
- open location the_url
- activate
- end tell
- end openURL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement