1 – In Rosemary’s Shortcut, update the dictionary to contain the list of known WiFi networks that you might connect to (network name as the key, full address as the value)
2 – add an Exit Shortcut command to the end of the Shortcut (Shortcuts will add the magic variable If Result automatically.
In the Shortcut that you want to use the location data, use a Run Shortcut action to call the Get Location Shortcut and then use the magic variable returned from the run command in whatever command you want, here I have passed it in to the Get Weather action. You do need to update the magic variable to be a Location as shown in the second image.
It depends upon how you want to use the snippet that Rosemary provided. As provided it allows another line to be added to the end of the Shortcut to use the location information directly; with the Exit Shortcut you then use the snippet as a reusable function to call from another Shortcut.
The error shown is due to no key being passed to the dictionary call when WiFi is turned off. I’ve modified the original Shortcut to allow for this case here:
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.
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.
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:
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.