Open sgrodnik opened 2 years ago
I'm happy you find this useful!
- Not so often, but I feel great laziness every time I edit my layout)
I may delay this feature, in order to work on other things. I'll add it if the 'copy' function is simple enough though.
- You are right, I don't have media keys. I typed them manually in the settings file and it works.
Got it 👍, I will add these buttons ASAP (I think I'll have this up in about 24 hours)
- My case: One menu for a group of apps (for ex. text editors), but they have slightly different hotkeys (ex. Ctrl+Y vs Ctrl+Shift+Z). So I need #IfWinActive to distinct apps, not windows of an app. Yes, Custom Functions (raw ahk) would be great here too.
Oh, well good news, I already support this!
Let me know if you run into any issues with this. I really need to add some proper documentation for this app.
- Another idea: any sequence of keys (like ^+!#{Enter 2} in ahk send) support in send key function.
In case you want a more complicated sequence of events. I recommend Pulover's Macro Creator, an amazing program on its own and it can basically record a sequence of mouse clicks, send keys, or even window focus/activation. You can also opt to record the delays between the actions or have a set key delay of some sort, all configurable. After recording, you can export it to an AHK file: by default it asks you where to bind the macro to (there's no option for leaving it unbound) but with a bit of tweaking you can just edit the keybind out and it's ready to be used for AHP.
For example, this is what the exported ahk looks like so I deleted these lines:
After adding the Run File function, it works like a charm!
- Another idea: Suggest the name of a new slice based on its function. Now it is just Slice N.
I also like having some sort of default or suggested names when configuring the slices. Maybe if the function was a Send Key, it would suggest using the keyboard shortcut as the actual name of the slice.
Something like this:
Oh, well good news, I already support this!
No, I guess my previous description was not clear :) let's consider an imaginary case (because mine real ones are too crazy to discuss): I already have such a profile (for notepad.exe and sublimeText.exe). One of them for "Undo" uses Ctrl-Z, another Ctrl-Shift-Z (it is not true, we are imagining). Also I have a submenu for basic text operations (copy/paste/selectAll/undo/redo etc.). Today I have to have two distinct profiles and two almost the same submenus:
My idea is to have just one profile, but different behaviour for different apps of the profile:
#IfWinActive(notepad.exe){undo_variant_1}; #IfWinActive(sublimeText.exe){undo_variant_2}
/redo;Yes, I'm aware of Pulover's Macro Creator. Its idea is truly amazing. But creating lots of separate .ahk scripst is quite a botch is the case of the feature under discussion (Custom Function). By the way, I've not coped with PMC in case of a complex macro with multiple WinWait steps. So I put it aside :(
Another idea: Suggest the name of a new slice based on its function. Now it is just Slice N. I also like having some sort of default or suggested names when configuring the slices. Maybe if the function was a Send Key, it would suggest using the keyboard shortcut as the actual name of the slice.
This has been added to v1.0.16, works pretty much how @rexelbartolome depicted. Default labels have also been added for all the other functions.
@sgrodnik for the time being, creating an AHK script with your #IF directives in the script is your best bet at the moment until Custom Functions are added (which will be functionally identical anyway, just faster).
Another idea: I might want to implement such a logic: the left half (MouseGetPos...) of my screen should fire one menu, and the right half fires another menu (I use RMB as a pieKey). Guess it's a case exactly for the #IF directive.
Now this is something Custom Functions would not address. I see this as something that will have to be handled by the PieMenu AHK class type to import into your own scripts. I just don't see a clean way to implement this on my end.
for 2., Menu instancing and copying is addressed in #109
Which functions similarly to material instancing in blender in terms of the UI.
Thank you for your great work! Sorry for my poor English :)