MACRO: Toggle Between Macros and Maintain Scroll Position

Great! I look forward to seeing it.

I just uploaded version 2.0 of this macro. Give me a little time to upload the remaining macros, then we can discuss re-incorporating your changes into the new version.

I didn’t include your changes in this version, because I was fairly sure we’ll want to re-work them, to some degree or another, in light of other macros I’ll upload shortly. Maybe not, but let’s see.

I’ll get back to you soon. However, if I forget, hit me up again. And if I do forget, don’t feel slighted - with everything rolling around in my head right now, some things are bound to roll right out my ears and drop on the ground. :blush: Especially after my fiasco yesterday…

Dan, thanks a lot for this macro useful of course as help in KM editor navigation and useful too in improving my learning of AppleScript :slight_smile:

1 - I experience errors like

and hopefully find why, so I share :wink:

It is due to localization troubles in AppleScript - as I use a French configuration - in the bidirectional conversion of numeric values <=> text, needed by KM only text variables, e.g. "0.7521263669501823" <=> "0,7521263669501823".

For a more localization bullet proof transcoding, I suggest to change beginning of AppleScript code of Macro Scroll Position - Store for Current Macro (Sub-Macro) to

2 - BTW Macro Scroll Position - Restore for Current Macro (Sub-Macro) is not (yet) called :wink:


Awesome - I like it. I'll do it.

It's not? This is what I see:

Are you saying it's different on yours?

This is that I see

I.e. the macro Toggle Between Macros and Maintain Scroll Position don't use macro Macro Scroll Position - Restore for Current Macro (Sub-Macro) of your zipped package.

I guess I don’t understand what you were saying then.

Dan, I’m good with that. I’ll wait until the dust settles on your new round of macros before making any further comments or changes.

I agree with that. I posted my macro mainly for Dan’s benefit, but if you are using it I suggest you now switch to Ver 2 of Dan’s macro.

1 Like

I wish I could figure out how to get the list of macros that show up in the list you get when you click the “clock” icon. I don’t see that stored anywhere, at least not that I noticed.

Got any ideas?

BTW, good idea to wait for the dust to settle. I’m learning a bunch of new things today. :slight_smile:

Oh, and I hope you notice, all of the macros I uploaded today use “DND__” in front of variables I want to persist. And it’s funny - the moment I actually started using the prefix, I loved it. I thought it was going to look fugly, but it doesn’t at all. Guess I should have given in a long time ago! :blush:

OK, what other suggestions have you made that I blew off? :slight_smile:

I think this is called the “Recently Edited Macros” or “Macro Edit History”.
You might check for a .plist in the KM support folder.

But I’m sure @peternlewis can tell us exactly where he stores this list.

I did notice, and was pleasantly surprised. It is good to hear that this convention works for you also.

Oh my, the list is far, far to long to publish here.:astonished:
Just kidding!!! I think we agree on far, far more things that we have different preferences for — and that is all they are, “preferences”.
I’m sure I’ve learned more from you, and probably ignored more of your suggestions than the other way around. :smile:

LOL big time. And I wouldn’t count on it - either of those things.

It is saved in the com.stairways.keyboardmaestro.editor.plist file, but only when the editor quits.

thanks, Peter.

Any ideas on how to get this list in real-time, while the KM Editor is open?
Or must we resort to using AppleScript to capture the list in the menu?

Hey JM,

I tried to do that when I wrote the open history button menu script, but as far as I can tell there are no UI elements available from button 1 of group 5 – even after the menu has been opened.


Thanks, Chris.

I’m wondering…

What if you issued a DownArrow keystroke to highlight the first menu item?
Would it then be possible to capture the menu item name?



No UI elements are available.


Any chance of getting access to this as an OSA command?

The world is full of possibilities. That one is more likely that Batman v Superman being a good movie, but probably less likely than the next Star Wars movie.

1 Like

You know… it’s kind of… hard… to type… when… I’m laughing!

Thanks. That felt good. :slight_smile:

NOTE: This macro is now outdated.

KM now automatically keeps track of scroll position.

Please use this macro instead:

1 Like