It's meant to pass a url between browsers. It errors on the line where the <<< is, with the error of 'Expected "then", etc, but found identifier. What can I do? Plus, as I'm new to this any general ideas I lack in?
Code:
tell application "System Events"
delay 1
--Change Opera and Safari for your two browsers.
set b1 to "Opera"
set b2 to "Safari"
say b1
set myApp to name of first application process whose frontmost is true
if myApp is "b1" then
say yes
tell application b1
set myInfo to GetWindowInfo of window 1
set myURL to item 1 of myInfo
end tell
else if myApp is "Safari then
tell application b2
set myURL to URL of document 1
end tell
else
say else
return
end if
if myApp is "b1" then <<<<<
tell application b2
OpenURL myURL
end tell
else if myApp is "b2" then
tell application b1
make new document with properties {URL:theURL}
end tell
else
say "test2"
return
end if
end tell