I got stuck on this part, how can I determine if a shortcut has already been run in today please?
Use a Data Jar variable to store the date that the Shortcut was run.
The first action checks to see if the variable exists. If not, assume that this is the first time the Shortcut has ever been run (ie not run today).
If the variable exists, compare the date (formatted to be date only, no time) with today’s date. If they match, the Shortcut has been run today. If the dates don’t match, it has not run today.
Update the Data Jar variable with today’s date.
Here is the Shortcut sample.
https://www.icloud.com/shortcuts/822dbd5ce6f24f84bf9dfda8b97c1a3c
Hope this makes sense.
That’s super clear, thank you Tony!
Glad that it has helped.
This was a super interesting episode that’s helped me improve my morning briefing.
Currently I have the commute time to work. What’s the easiest way to only do that on monday through friday?
Assuming your device is using English (or German, some other languages may work too), format the date as EEEEE
, if it is an S then it’s the weekend, if not it’s a weekday. I have this as a subroutine shortcut, if it’s a weekday it checks a calendar to see if it’s a holiday and returns true or false for me.
https://www.icloud.com/shortcuts/a251ce36b64a493aa747f8687430f65a
Thanks.
I never use subroutines because I hate them cluttering up the shortcuts. I hope Apple adds better organization in iOS 14
I use this in a lot of places so find subroutines much better than adjusting the logic in lots of shortcuts - and inevitably missing one or two!
For me the aspects of reuse, flexibility and compartmentalising of functionality far outweighs any organisational issues that might be apparent within the Shortcuts app. I still find that in Shortcuts itself, anything over fifty lends itself more efficiently to searching.
However, I would note that a good naming standards/hygiene is incredibly useful in regards to searching and organising, and if you are having organisational issues or feel you could, then you should absolutely be considering LaunchCuts (episode 45).
If you happen to have naming standards and LaunchCuts, you can even use Smart Folders to great effect in automatically organising many of your shortcuts.
Just listening to this episode today, Rosemary your location shortcut is awesome! I have been using the workaround of requesting current location from the “Get current weather at…” action, which for some reason runs a lot quicker than the “Get current location” one. Your approach is still faster for when I’m on a matching wifi network, so I made this shortcut to combine the two for maximum speed and efficiency:
https://www.icloud.com/shortcuts/b8fe06117b97426ca8009b583698be5d
An AppleScript for changing Highlight Color and Accent Color in MacOS that can be used in Keyboard Maestro:
tell application “System Events”
tell appearance preferences
set properties to {highlight color:purple}
end tell
end tell
tell application “System Events”
click checkbox “purple” of window “General” of application process “System Preferences”
end tell
I have barely ever done AppleScript before, so maybe this could be better. You have to open the General Preferences pane first (Keyboard Maestro will do it) for it to work on the Accent Colors. The Accent Colors of pink and yellow, however, won’t work this way. I had Keyboard Maestro run the AppleScript.
The Keyboard Maestro action “Set Desktop Image” (Category is “System Control”) works to set the wallpaper.