MACRO: Run Current Macro

Dan, I just ran it, twice, and the thought that immediately came to mind was:
"slicker than owl sh.."

I think you will probably recognize that old, very old, expression. :wink:

I don't. But my guess would be either @ccstone or @Tom.

Thatā€™s not one of my expressions - I think it must be a Texas thing. But it doesnā€™t really need an explanation, does it? :stuck_out_tongue:

Like I said in the comments - itā€™s quickly becoming one of my favorite macros.

Just found a bug. Well, actually, not a bug. But a misleading error message:

What actually happened is that I tried to run a macro in a group that is only active when Quiver is the active app. Since the KM Editor was the active app, it wouldn't run the macro. But the error says "found no macros with a matching name".

I'm going to put in some checks to verify the macro and group are active.

OK, updated to v1.1. Better error message:

Either the Macro is not enabled, or the Group that contains it isnā€™t active or enabled.

Yeah, I already noticed that you have shamelessly stolen my patented long key press. Shame on you :open_mouth: (At least you announced it beforehand ;ā€Œ-)

But now Iā€™m stealing back from you. Iā€™ve already started with your AppleScript for running a macro with ā€˜selectedMacrosā€™. And thatā€™s only the beginningā€¦ :stuck_out_tongue:

So, I'm standing on your shoulders, and you're standing on mine? How Mobius of us!

Thanks again for the great idea of the "long press". I know you stole it from somewhere else, but still... it's so cool!!!

Indeed! I had the idea when I was reflecting on the usefulness (and sometimes not usefulness) of long presses and force touches on iOS.

1 Like

BTW, also macOS uses long key presses, unless you have disabled it:

1 Like

All this standing around is wasting time!
You guys get back to work producing more macros that take up my time downloading and installing!

LOL

3 Likes

Great macro, Dan!

I'd like to request two enhancements:

  1. Support running the last macro selected for editing when the active app is an app other than KM. I often need to test macros that require the active, frontmost app to be something else, like Evernote.
  2. Provide an optional prompt showing the macro name and confirming the user wants to run it.

Thanks.

Thanks!

Have you tried it? It just asks the KM Editor for the currently-selected macro, and the KM Editor returns the selected macro regardless of whether the KM Editor is active (has to be running of course, but shouldn't have to be active).

Sounds reasonable. How would you imagine that would work? Holding down the key is for prompting for a parameter, so I wouldn't think that would be a good idea.

Yes, but evidently I was doing something wrong, like having the Macro Group disabled. :smile:

So, running with another app being active works.

I inserted these two Actions (in purple), but the Macro Name comes back as "Not Found"
What am I doing wrong? How do I get the name of the Macro to be run?

I don't see the need for any special UI. Just add the Actions and enable or disable however you like for the default. The user (as part of setup) can then change to suit his/her perf.

I'll post how I do it, and hopefully someone else can show me the one-step way of doing it, because I could never get it to work. And don't laugh at my convoluted solution - it works!

NOTE: In the second action, the word "uid" is NOT a variable. It's just text, and I replace it in the third action.

Hey, I know a guy that has already figured this out. LOL

Check out this:

So, here's my two Action to get the Macro Name, following your example:

Why the hell didn't that guy speak up earlier?

(I hate it when that happens. :confused:)

Anyway, cool! So show me how you'd change the macro, or just post it. (You want it, you do it! :slight_smile:)

Here's my small revision: Added 4 Actions (+ Change Log), all in purple.
Feel free to revise to suit your needs and style.

MACRO: Run Current Macro

Run Current Macro 1.1.1.kmmacros (44 KB)

This is really working out to be a great macro for me -- using many times a day.

A couple of questions/comments:

  1. What changed in the second action? It looks the same (I think).
  2. If Iā€™m reading this correctly, it only alerts you of what macro is running - it doesnā€™t prompt you if itā€™s OK. Am I right? All you wanted was to be notified what it was running, with no chance to stop it?
  3. It would make sense to add the macro name to the Prompt for User Input title somewhere, donā€™t you think.

And lastly, I mean, seriously, you couldnā€™t tell what variable naming conventions I was using, and conform to them? Thatā€™s the first rule of modifying other peopleā€™s code - follow their style and conventions (assuming they have any), regardless of whether you like them or not (the styles and conventions, not the person :slight_smile:).

In my opinion, thereā€™s only two times I wouldnā€™t do that - again, assuming they have a style or conventions. They are 1) Something is just flat-out wrong. 2) I couldnā€™t if I wanted to, because itā€™s over my head (we wonā€™t name any names here).

Iā€™m smiling as I type this, because Iā€™m not ticked or anything. But let me tell you my thinking on this: I show respect to the other developer when I try to match their style, even if it makes my skin crawl a little. Maybe especially then.

So thatā€™s my thoughts.

Maybe you are confused about which actions I changed.
I didn't change ANY actions. I ADDED 3:

The first two of those are modeled exactly after your actions in
MACRO: Get Selected Macro UUID (and name) (without the clipboard)

The 3rd is an ALERT, which does pause, and gives you the option to stop/cancel the macro.

I agree, except: You asked for my changes, which I had already done just for my own purpose, never intending to post. My post was just to show you my changes. I didn't expect you to use my revision as a replacement.

Feel free to totally discard my update if it is of no value to you. :smile:

OK. First, there are 5 actions in purple. Thatā€™s where my confusion was - I guess I made that first one purple myself - I forgot! :confounded:

Second, and this is another time to blush, I guess Iā€™ve never used ā€œAlertā€ before. I was thinking it was like Notify. I always use a Prompt to do what Alert does.

Iā€™m having a great day, huh? Forgot I already knew how to get the name of a macro from itā€™s ID, and now this. LOL.

As far as the style/convention thing: I think my assumption was reasonable, since you went to the trouble of adding the change log and such. I personally wouldnā€™t have added that for my own uses, or at least nothing more than ā€œI changed thisā€. But good on ya for doing that!

Anyway, thatā€™s where my misunderstandings came from.