Created
June 25, 2021 16:19
-
-
Save jaysonwhelpley/ee07d817d63a34e10fab63c0976bdef8 to your computer and use it in GitHub Desktop.
Calendar Shortcut Apple Script - for use with BetterTouchTool
This file contains 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
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://calendar.google" then | |
set active tab index of w to i | |
set index of w to 1 | |
if URL of t is not "https://calendar.google.com/calendar/u/1/r/week" then | |
set URL of t to "https://calendar.google.com/calendar/u/1/r/week" | |
end if | |
return | |
end if | |
set i to i + 1 | |
end repeat | |
end repeat | |
open location "https://calendar.google.com/calendar/u/1/r/week" | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment