Page 1 of 1

Recent macros menu

Posted: Fri Sep 11, 2020 8:29 pm
by TheMarkster
There is now a recent macros menu group in the Macro menu. It functions similarly to Recent files in the File menu except for macros. A macro gets added to the recent list when it gets created, executed, or opened for editing from within the Macros execute dialog. A shortcut is created for the macros in the form of Ctrl+Shift+1 for the most recently used macro, Ctrl+Shift+2 for the 2nd most recently used macro, etc., up to 9. The default I believe is for 12 macros to be listed and for the 3 most recently used to get the keyboard shortcuts using Ctrl+Shift+ as the modifiers, but it has been a while since I worked on this. This is all configurable in Edit -> Preferences -> General -> Macro tab.

Today I updated the wiki to document this feature. https://wiki.freecadweb.org/Preferences_Editor

Note: if you want to open the macro in the editor rather than execute the macro press the Shift key while clicking the macro in the recent macros menu.

Re: Recent macros menu

Posted: Fri Sep 11, 2020 10:36 pm
by chrisb
I've been waiting for this since it was announced. Good to see it in master now.

Re: Recent macros menu

Posted: Sat Sep 12, 2020 2:09 am
by Kunda1
It's weird though, in the wiki it the screenshot uploaded to show the Recent Macros preferences, is dated from March 15 2020
So was this feature already in Master since March ?

Edit: nevertheless, this feature is awesome! It has key combos as well! Right on!

Re: Recent macros menu

Posted: Sat Sep 12, 2020 5:15 pm
by TheMarkster
The wiki image in March didn't include the macros menu preferences. I only uploaded that file yesterday, which another user updated again later to reduce it's size a little bit. The feature was added to master in the last few days.

Re: Recent macros menu

Posted: Wed Sep 30, 2020 11:06 am
by mario52
hi

thanks for this adding,

is it possible to have the same function but for edit the macro (new button in the "Execute macro" window)

or sort by date ...

thanks

mario

Re: Recent macros menu

Posted: Wed Sep 30, 2020 6:46 pm
by TheMarkster
mario52 wrote:
Wed Sep 30, 2020 11:06 am
hi

thanks for this adding,

is it possible to have the same function but for edit the macro (new button in the "Execute macro" window)

or sort by date ...

thanks

mario
I do not understand. There is already Edit button in Execute Macro dialog. To edit the macro from recent macros (instead of execute) hold Shift key while clicking.

Re: Recent macros menu

Posted: Thu Oct 01, 2020 8:23 am
by mario52
hi
TheMarkster wrote:
Wed Sep 30, 2020 6:46 pm
hold Shift key while clicking.
many thanks (sorry for the noise)

mario

Re: Recent macros menu

Posted: Thu Oct 01, 2020 10:56 pm
by freedman
Another thought; If there is only one macro file open then make the Green macro start arrow active, so while you are working on a model you can start the macro without changing screen focus.

Re: Recent macros menu

Posted: Fri Oct 02, 2020 3:55 pm
by freedman
Wow! this is great, works as described. Already using it and saving time.
Thank you

Re: Recent macros menu

Posted: Sat Oct 03, 2020 4:28 pm
by mendy
Hello noticed this post and tried it in a file and the recent macros was showing three that I removed. If I click on a removed one it correctly says File not found and the macro is removed from the list. Deleted all this way and list is empty. (was wondering why a macro I was using wasn't in list but figured out it was because I was launching from created toolbar button, made sense to me). Saved file and on relaunch the recent macros show the 3 macros again. Found in parameter editor removing the three mru's solved that problem. Was trying manually installed macros so I installed one from addon manager and executed it and it showed up in list. Uninstalled with addon manager and it still shows up. Did try edit preferences and set size of recent macro list to 0, apply and restart. List is now clear but if edit preferences and set it back to say 3, apply save and restart they show up as they are still in the parameter editor list. Probably not explaining properly and just noticed because I was trying various macros and removing them versus someone using a stable list. Nice feature does work well did not check if say with a setting of three if new macro use would move them off the list.