Skip to content

Instantly share code, notes, and snippets.

@jaysonwhelpley
Created June 25, 2021 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaysonwhelpley/ee07d817d63a34e10fab63c0976bdef8 to your computer and use it in GitHub Desktop.
Save jaysonwhelpley/ee07d817d63a34e10fab63c0976bdef8 to your computer and use it in GitHub Desktop.
Calendar Shortcut Apple Script - for use with BetterTouchTool
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