Isso deve funcionar. É um AppleScript.
set YourURL to "www.google.com"
set URLtoOpenOn to "https://au.yahoo.com/?p=us"
repeat
tell application "Safari"
set URLs to URL of every document
end tell
repeat with theItem in URLs
if theItem = URLtoOpenOn then
tell application "Safari" to open YourURL
end if
end repeat
delay 3
end repeat