Forked from s4y/Whole Foods delivery watcher.scpt
Last active
December 17, 2020 19:05
-
-
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)
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
(* 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