[PR# 3616] add recent macros to macro menu

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
TheMarkster
Veteran
Posts: 5508
Joined: Thu Apr 05, 2018 1:53 am

Re: [PR# 3616] add recent macros to macro menu

Post by TheMarkster »

I made a few more changes.

I moved the recent macros list length setting to the Macro tab in preferences (out of general settings). I also added the settings for the number of shortcuts to create, so if you don't want shortcuts at all, just set this value to 0. I also added a setting to configure the keyboard modifiers. The default is "Ctrl+Shift+", but if you want something like "Ctrl+F6," this would create the shortcut Ctrl+F6,1 for shortcut 1, Ctrl+F6,2 for shortcut 2 ,etc. This should provide enough flexibility to avoid any shortcut conflicts.

There doesn't seem to be too much consensus on the best way to do this, but I think with these settings options it should be configurable enough to satisfy most users.

Edit: screenshot
Snip macro screenshot-669c9a.png
Snip macro screenshot-669c9a.png (107.63 KiB) Viewed 606 times
User avatar
yorik
Founder
Posts: 13659
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: [PR# 3616] add recent macros to macro menu

Post by yorik »

There is indeed not much consensus on keyboard shortcuts, but the way you did it seems good to me since it's easily configurable by the user. I would just, maybe, move your 3 entries out of the "General macro settings" group and make some "Macros menu" group so users understand better the scope?
TheMarkster
Veteran
Posts: 5508
Joined: Thu Apr 05, 2018 1:53 am

Re: [PR# 3616] add recent macros to macro menu

Post by TheMarkster »

yorik wrote: Tue Jul 07, 2020 8:41 am There is indeed not much consensus on keyboard shortcuts, but the way you did it seems good to me since it's easily configurable by the user. I would just, maybe, move your 3 entries out of the "General macro settings" group and make some "Macros menu" group so users understand better the scope?
Okay. I created a new group for the recent macros menu settings. Another change will be to only show the base filename of the macro, for example Snip instead of Snip.FCMacro or Snip.py. I did this because I noticed when switching to German language the entire shortcut wasn't showing, so hopefully this leaves a bit more room. Or maybe I just needed to restart FreeCAD while in that language. Another change is to show the shortcut in the status bar in case in some other language it doesn't show fully in the menu.
Snip macro screenshot-b6f0df.png
Snip macro screenshot-b6f0df.png (110.92 KiB) Viewed 553 times
TheMarkster
Veteran
Posts: 5508
Joined: Thu Apr 05, 2018 1:53 am

Re: [PR# 3616] add recent macros to macro menu

Post by TheMarkster »

There is a minor bug somewhere I can't seem to figure out. If you make a settings change the change is accepted when you go back to the edit-> preferences -> macro page and in the Tools -> Edit Parameters, but the changes don't actually take effect until FreeCAD restarts. And if you use the recent macros menu to execute a macro before restarting it reverts to the previous settings.
mario52
Veteran
Posts: 4690
Joined: Wed May 16, 2012 2:13 pm

Re: [PR# 3616] add recent macros to macro menu

Post by mario52 »

hi

yes certain parameter are activate immediately and certain not

here my idea for trap FreeCAD Standard / imperial unit system change - short cut

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
TheMarkster
Veteran
Posts: 5508
Joined: Thu Apr 05, 2018 1:53 am

Re: [PR# 3616] add recent macros to macro menu

Post by TheMarkster »

Thanks, Mario. I think have the bug fixed now.
Post Reply