Howdy folks, I have a question that is perhaps not directly related to Keyboard Maestro but I imagine somebody here will know the answer either way.
I have been using iOS/iPadOS Shortcuts app in conjunction with a Keyboard Maestro macro to run macros from my iPhone/iPad. I can't for the life of me remember who here provided it; I wish I did because it works GREAT. Either way, it works in the following way:
- Shortcuts app reads a json dictionary in my Dropbox folder which contains my macro UUIDs
- It then allows me to select an entry from that dictionary
- The entry's UUID is then saved to a
txt
file which is put into a folder the KM monitors. - When the file is synced, KM reads its contents (the macro UUID), and then uses an AppleScript to execute that macro.
- The file is then deleted.
All of that works perfectly fine. But what I've noticed is that when Shortcuts reads the json file, the order that the list appears in is, if not random, then at least not in the order that appears in the file itself. For example, here is how I have the text sorted in the json file:
{
"LB work apps open" : "538205B6-CF94-4046-BB0A-0F16BA9FE3AA" ,
"LB work apps close" : "5FB905C1-6426-4A1B-8647-2678AB790AAD" ,
"LB status check" : "D55B80E5-BC88-4468-AA6F-A29B3EC62F78" ,
"LB status set to away" : "1FFBC635-4476-46CD-854C-35F03403B8B0" ,
"LB status set to available" : "FD70B76B-29EC-447E-9B08-8B1D1ADA1EE1" ,
"Toggle microphone (MicDrop)" : "C6EB8B41-7735-4347-8A38-D8BD48EED37E" ,
"Toggle microphone (MuteMe)" : "98228A5C-34F3-4120-A699-15EE46052168" ,
}
And the screenshot shows how it appears when run from my iPhone/iPad:
I can't seem to see any rhyme or reason why it's in that order since it doesn’t appear to be sorted by name, UUID, or even which one was triggered last. So what I'd like to do is see if there's a way to have the list appear in the same order it has in the json file when ran from Shortcuts.
Here is a link and screenshot of the Shortcuts shortcut, as well as the KM macro if anybody wants to see it.
Shortcuts link:
https://www.icloud.com/shortcuts/7027497ea82148c58b083bc76a5e1c7e
Shortcuts screenshot:
Keyboard Maestro macro
49)iOS Shortcuts Macro Trigger.kmmacros (30 KB)
Sorry for the wall of text, but I figure the more info the better. Any info/advice is appreciated. Thanks in advance!
-Chris