Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavidLiedle/3501a47b2d5345478b6d7a12d70fbdd9 to your computer and use it in GitHub Desktop.
Save DavidLiedle/3501a47b2d5345478b6d7a12d70fbdd9 to your computer and use it in GitHub Desktop.
AppleScript which reloads a COVID-19 Antibody Test appointment opportunity page (Colorado, USA) and displays a notification when time slots are available or it otherwise needs attention (e.g. because an item has become unavailable)
(* Watch this page for change: https://www.nationaljewish.org/patients-visitors/patient-info/important-updates/coronavirus-information-and-resources/patient-care/covid-19-testing-antibody-diagnostic *)
tell application "Safari"
repeat
repeat with theWindow in every window
repeat with theTab in every tab of theWindow
if name of theTab contains "COVID-19 Antibody" then
set appointmentWindow to theWindow
set checkoutTab to theTab
end if
end repeat
end repeat
tell appointmentTab
set URL to URL
delay 10
if text of appointmentTab does not contain "No More Appointments" then
display notification "National Jewish Health Appointment Status Changed!" sound name "Sosumi"
set current tab of appointmentWindow to appointmentTab
set index of appointmentWindow to 1
end if
end tell
delay 90
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment