I'm trying to get the URL from Safari, close the tab and open it in Chrome ( TUAW Post ) But I keep getting the error:
error "Safari got an error: Can’t get current tab." number -1728 from current tab
From the code line:
set theURL to URL of current tab of window 1
Any suggestions?
All the code:
property theURL : ""
tell application "Safari"
set t set theURL to URL of current tab of window 1
close current tab
end tell
tell application "Google Chrome"
set URL of active tab of window 1 to theURL
activate
end tell