KM — New Macro Hot Keys

Dan's MIM helps some.

It's not that these macros are so special, it's just that it there is no real way to do them, and this took months of use to hone to where they work well.

I don't know. Some people post images, some not. If I post, do I show everything expanded? Just the things that actually do something? Just what I wouldn't be embarrassed for other people to see? :slight_smile: I never know. In any case, here they are:

New Hot Key Macro

** New Hot Key Trigger**

1 Like

The unofficial standard is to post both macro file and image.
The KM Editor Share button makes this very easy.
See

Common sense indicates which Actions to expand before you upload the image. Expand those Actions which are:

  • The major "guts" of the macro, that do the heavy lifting
  • Unusual Action configuration that you yourself would want to know about macros posted by others
  • Uncommon or Rarely Used Actions
  • Common Actions used in an uncommon way

Collapse those Actions that are:

  • Well defined by the Action Title
  • Common use of common Actions (like "Set Variable to Text")

Also, several of us always posts the scripts used in the Macro in a separate code block. Here is a macro that makes it easy to post your scripts:

MACRO: KM Forum -- Paste Script Block

1 Like

Thank you, @MitchellModel.
Posting the image helps a lot.

Your level of detail is just right: easy to understand, without getting tangled up in details of IF statements.
.

Yes, indeed.
So your macros here are still highly useful, even if a little "dicey".
.

I certainly understand that sentiment -- from similar, personal experience.

And on that basis, you may not enjoy my comments, because they may suggest even more honing.

1. Instead of "Pause for X seconds" I try to discipline myself to use "Pause Until Condition".
It takes more work and more testing, but the benefit is more reliable macros.
Would "Pause Until Condition" benefit these macros, or not?

2. Your use of, "Click a Green +" is especially notable for the way you've handled cases with red minus and without red minus.
When I tried to create a macro to do this, I failed, because I didn't think carefully about that red minus.
You did, and its working.
Now, in your macro, I wonder if using Switch/Case, instead of "If", would make it easier to "hone" and so less "dicey".

3. Not specific to these macros, but I notice your careful use of "Hide Actions" view.
Makes perfect sense, but I wonder if you are actually using the "Actions" view?
I've found "Insert Macro By Name" so much quicker.
And easier, too, because shows pictures of actions.
(I prefer to avoid the mouse "dance" that "Actions" view demands.)

Your further thoughts, please.

The solution for adding a Hot Key Trigger posted by @ccstone, which I combined into one macro, seems to work very well and does not rely on Found Images.

See:
MACRO: [KM] Add Hot Key Trigger

Just as a point of practice I expect people to tune down the pauses as they find the macro working and want to speed it up. Also, brief pauses are always useful when macros aren't behaving as expected. Some things just aren't worth the time to discover a more elegant solution

I can't see what kind of Pause Until one would use to replace the pauses in these macros. I do use Pause Until whenever I can see a way to do so.

If I remember right, executing Hide Actions move the Actions list out of the way, which was necessary for some reason or other, or was at some point and no longer is. If the actions are not showing it's a no-op.

I know Mitchell talked about this, but let me expand on this a little. As I'm sure you know, just importing a macro can't cause any harm. It's only if the macro gets triggered that there might be an issue.

So before I import a macro from someone I'm not familiar with, I want to make sure that if there's any triggers I might not like - specifically, something that gets triggered more-or-less automatically, the triggers are disabled when I import them.

That's one of the reason's I wrote my Macro Import Manager. It forces me to examine the macro first, allowing me to disable any undesirable triggers before importing. The second reason is that I can change the Group so they go where I want them to go.

So my feeling is this: As long as I use MIM to do the importing, I don't worry too much about what macros I import. And believe me - I'm pretty careful with stuff other people wrote. :smile:

1 Like

If you hold down the keys:

  • Editor Quits Engine on launch if all modifiers are held down.

  • Imported macros are disabled if all modifers are held down.

-Chris

That is not well-known nor well-advertised.

@peternlewis, I would welcome a KM Editor Preference to disable all imported macros.

In this day and age of emphasis on safety and security, it would seem wise.

True.

I used to kill the Keyboard Maestro Engine before importing anything, but that's not necessary now.

I believe the wiki does not cover anything at all about importing or exporting – and should.

-Chris

Chris, I don't think I understand this. I am unable to reproduce this behavior.

Can you please provide the exact steps to import macros as disabled.
Thanks.

EDIT:

I have created this KM Wiki section, that needs to be updated:
Import Macros in Safe Mode

Hey JM,

Hold down all the modifier keys at once and drag-and-drop one or more files to import onto the Keyboard Maestro Editor icon in the dock.

Or – right-click on the file(s) to import – hold down all the modifier keys – and select “Open”.

-Chris

Chris,

Sorry, but neither of these work for me.
The macro is imported as "enabled", just like always.

Hey JM,

The release notes document it, and I have tested it several times.

I have no idea why it wouldn't be working on your system.

Note that if the Keyboard Maestros Editor is NOT running then the item will NOT be imported – the Keyboard Maestro Engine will be disabled instead.

-Chris

I can't find this. Can you please post the exact URL?

I have tried it on both El Capitan and Yosemite, but the macros always are imported as "enabled"

Keyboard Maestro 7.1

“Version 7.1 enhances the Custom HTML Prompt further allowing customised user interfaces to be built, as well as the ability to import macros disabled or quit the Keyboard Maestro Engine on launch of the editor (both if all modifiers are held down).”

-Chris

This is VERY unclear as to how to actually do this.
When I hold down "all modifiers" when I launch KM, and/or when I select "File > Import Macros", the Macro is STILL imported as ENABLED.

@peternlewis, we really need a better, more user-friendly method to import Macros as disabled.

1 Like

I second that.

And I'm interested in the solution, too.

Are you sure they are not being imported into a disabled macro group?

Keyboard Maestro will not disable them if they are within a disabled macro group, or if it creates the macro group, it will disable the group instead of the macros.

What's unclear is why some are having problems and others aren't.

To be completely clear → all modifiers means → Shift-Control-Option-Command

When the Keyboard Maestro Editor is launched with all modifiers held down the Keyboard Maestro Engine is quit – IF it is running. If it is NOT running then the editor will be launched without launching the engine.

This has nothing to do with importing macros. It lets editor be fired up without running the engine, and that can save your bacon if you have an out-of-control macro that needs to be tended to before restarting the engine.

To import disabled when using the menu item “Import Macros” all modifiers must be held down at the point the file in the dialog is selected – not when the menu item “Import Macros” is selected.

You're sure you're making good contact with all of the modifiers for the duration of the import?

You could try using this little freeware keystroke visualizer utility to make certain:

Set the “Selected Visualizer” in the display preferences to “Svelte”.

(keycastr must be added to the System Prefs – Security & Privacy > Accessibility > Privacy.)

If you still can't get it working I suggest you make a movie of your attempts (that shows the keystrokes), and send a bug report to support.

Peter – would you consider adding a modifier-key such as ⌥ Option to the import-menu-items to expose “Import Disabled”?

-Chris

OK, that's the key: The Macro Group is imported as Disabled, BUT the macros are left enabled, IF the Macro Group did NOES not exist. I was only checking the status of the macro, not its group.

IF the Macro Group does exist, then the Macro itself is disabled.

Frankly, I find this a very confusing way to handle this, and also potentially dangerous.
I often MOVE imported Macros to one of my existing Groups (like "From Others") immediately after I import it. In which case the Macro remains ENABLED.

IMO, to make it consistent and easy to explain and understand, if the special "all modifiers" are held down, then ALL macros in the macro file should be imported as disabled. The Macro Group should not be changed.

@peternlewis, here is the UI that I think is simple and straight-forward, as well as safe and secure:

  • By default, ALL imported Macros and Actions should be imported as disabled.
  • The Macro Group (in the import file) should be left as is.
  • Provide a setting the KM Preferences, to change the default.
  • When the KM app > File menu is displayed, based on the setting in Preferences, it should show either
    • "Import Macros (normal)"
    • "Import Macros (disabled)"
    • the OPTION key would toggle this setting/display
    • "Normal" means in the state as saved in the macro file.

I hope you will agree, and that it would not be too hard to implement.
Of course, if you or anyone has a better ideal for the UI, please post.

Thanks.