Created
December 3, 2020 17:33
-
-
Save houshuang/e8f96a803987b4d4107db365ddf9f617 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set found to 0 | |
tell application "Google Chrome" | |
repeat with w in windows | |
set i to 1 | |
repeat with t in tabs of w | |
if URL of t starts with "https://roamresearch.com/#/app/stian" then | |
activate | |
set active tab index of w to i | |
set index of w to 1 | |
set found to 1 | |
delay 0.01 | |
do shell script "open -a Google\\ Chrome" | |
return | |
end if | |
set i to i + 1 | |
end repeat | |
end repeat | |
log found | |
if found ≠ 1 then | |
activate | |
open location "https://roamresearch.com/#/app/stian" | |
end if | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment