Hey @tjluoma, I would attend to this more fully had I a working computer, which I don’t right now. But I posted something recently that demonstrates one technique that would probably be extremely effective for this particular task.
I’ll just post the link to my first post in some other thread, and you can see what you are able to pull from that to adapt to this use case.
If you hit a roadblock, holla back with whatever you got, and either I’ll have my computer fixed or will just clarify whatever isn’t gleaned from above.
How precisely do you want to be able to trigger it?
Because the easiest way would be for a macro to simply set a specific time into a variable, and have another macro run periodically and check if that time has passed. And how precisely you want to specify the time determines the trigger period.
Although, you could do this:
Ask for the time
Figure out the time
Set variable When to a time to trigger (based on NOW function).
if NOW() < When - 3600
Enable Macro 2 “Check Hourly”
Enable Macro 3 “Check Every Minute”
Macro 2 “Check Hourly” (initially disabled)
Triggered every hour
if When > NOW() - 3600
Disable Macro 2
Enable Macro 3
Macro 3 “Check Every Minute” (initially disabled)
Triggered every minute
if When > NOW()
Disable Macro 3
That way it only checks every hour until the time approaches, and then every minute.
The alternative would be to use an AppleScript to create a macro with a specific trigger, but that starts to get messy. Doable, and probably no more complex than the above, but messy.
A bit more work to initially setup, but then you don't need a frequent periodic trigger running (every minute?) to check. Chris @ccstone and I have posted some examples of hacking a macro's XML. If you need help, let us know.
Yup. That's what I would do, and hopefully @tjluoma finds the link I posted helpful. I didn't find implementing it messy at all, and, if anything, much less complex than @peternlewis's method (though his is likely to be more adaptable to more situations, and has the benefit of being able to recognise when a scheduled trigger has not been able to run the macro at the exact time and do it as soon as it is able).