I’ve been searching, reading, and studying, waiting for the “aha!” moment to occur, and it just hasn’t happened. So let me ask just a couple of questions:
In AppleScript, how do I get the names of all the Macros (or the only Macro) in a .kmmacros file?
In AppleScript, how do I get the names of the Actions used in one of those Macros? If not names, something useful. I just can’t figure out the access path, and I’m hoping the answer to this question will turn the light on. Hope. Hope.
If someone could help me here, I would be eternally grateful, or at least slightly appreciative. Thanks.
set macroFile to "~/Documents/Keyboard Maestro Stuff/Exported Macros/Test Group Macros.kmmacros"
tell application "System Events"
tell property list file macroFile
property list items --> examine
name of property list items --> examine
properties of property list items --> examine
end tell
end tell
I don’t know if you were being sarcastic or not, but to a man with no Rosetta Stone, yes, it is.
I don’t know what “–> examine” means. I’m guessing your didn’t mean I should just run this script (after changing the file name), because it lists a whole lot of stuff.
Hmm, I’ll have to remember that. I use sarcasm all the time, although if I use it in written communication, I try to make it obvious. Still, it might sneak in by mistake. I hope not.
OK, here’s the thing. I get what you’re saying. I’m a developer, examining things is how I learn. But AppleScript isn’t a programming language, it’s an attempt at some hybrid language, and I’m so lost in it I have no idea how to do anything.
If there’s such things as classic objects with properties that can be examined using a debugger or the like, I haven’t discovered it. There’s no “object.property”, or an obvious way to examine an object that’s a child of another object. There’s things like “properties”, “attributes”, “content”, “value”, but I have no idea what’s what, and even if I did, I wouldn’t know what I’m seeing, because everything gets printed out in some supposedly human-readable form that is usually fairly indecipherable to me.
When I do Google searches, the answers rarely help me, because they usually show how to do the thing being talked about, but they don’t tell the “how it works”. And they’re talking to non-developers who have no preconceived ideas.
What I need as a “Guide to Using AppleScript , translated into Developer-Speak”.
There’s nothing wrong with a little humor, but genuine sarcasm is a different beastie.
Origin of SARCASM from Merriam-Webster Unabridged Dictionary:
“French sarcasme, from Late Latin sarcasmos, from Greek sarkasmos, from sarkasmos, from sarkazein to tear flesh like dogs, bite the lips in rage, speak bitterly, sneer, from sark-, sarx flesh; akin to Avestan thwarəs- to cut”
In my experience real sarcasm is usually poorly concealed hostility, and that’s why I try not to use it.
Wow, do you have a window on my past or something? Yes, for a long time I struggled with that very thing, until I spent a lot of time dealing with anger management. It still crops up once in a fortunately rare time, but as I said, it’s rare.