set theURL to "http://www.experts-exchange.com/searchResults.jsp?searchId=92962"
tell application "Safari"
activate
try
tell window 1 to set current tab to make new tab with properties {URL:theURL}
on error
open location theURL
end try
end tell
The code tells Safari to activate and to create a tab for the URL that appears in the first line of the code. If Safari isn't open it will open it and create a tab for EE, otherwise it will just add a new tab for EE. It's important to note that the URL contains a reference to a searchId which, for me, opens EE to one of my saved searches. If you'd like to do the same thing, just change the searchId to one of yours. Otherwise just use "https://www.experts-exchange.com" as the URL.
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (1)
Commented:
Thanks, it's a great article!