dumbeau / AutoHotPie

Radial menus in Windows, aka PIE MENYOOS!
MIT License
340 stars 18 forks source link

Cannot integrate with PMC #31

Closed vfxturjo closed 2 years ago

vfxturjo commented 2 years ago

Hi, this is PMC -> https://www.macrocreator.com/ it is a macro creator for AutoHotKey.

I wanted to make a slice in AutoHotPie that sends f13 as a sendkey, and in PMC, i added f13 as an input for a ahk script.

i tried different keys and key combinations but for some reason PMC doesnt get shortcut from AHP. when i normally press my keyboard, PMC works (gets the keys) but when i send keys from AHP, it doesnt get the keys

am i doing something wrong?

image

dumbeau commented 2 years ago

I don't know what PMC is. Could you elaborate?

vfxturjo commented 2 years ago

I don't know what PMC is. Could you elaborate?

sure. PMC = Pulover's macro creator

it can record user actions and writes AHK code it has a GUI for creating different AHK tasks too.

example: image

vfxturjo commented 2 years ago

I'm trying to integrate both because: with AHP I can use mouse gestures to trigger things easily, and in a categorized way (menus and submenus) with PMC I can make my custom AHK scripts easily, modify them, iterate on improving on them.

I don't know if the issue is with PMC or AHP. But I want to know combining both world can be very useful I think

dumbeau commented 2 years ago

Ohhh I should've known PMC... of course!

So, the issue you're running into is that one AHK script cannot intercept a simulated keystroke from another AHK script. What you'll have to do is export your macro from PMC as a standalone ahk script with no hotkey and use the 'Run File' function in AutoHotPie to launch the script. Lmk if you need me to more specific on this.

What is nice about that is that you also won't have to sacrifice a key this way either.

vfxturjo commented 2 years ago

Thank you for your solution!

BTW, I tried adding hotkey in a AHKey script, then keep it running in the background, then use AHPie to trigger the code.

like this... this AHKey was running:

F13::
Copy_link_to_this_line:
Click, Left, 1
Sleep, 10
Send, {LControl Down}{3}{a}{b}{k}
Sleep, 30
Send, {v}{LControl Up}{Enter}
Return

then i sent F13 using AHPie. it worked 😄

i know the reason... image

when i turn it on, then another AHKey script doesnt get any keys from AHPie because it is also an AHKey script!

Anyway, I know you already know all of this. I wrote them because I am enjoying tinkering with AHPie. I love it ❤️ and I will use your solution: running AHK scripts with no hotkey, using "Run File" option.

keep it up and stay well man!

dumbeau commented 2 years ago

What that works!?? Okay I thought I tested everything to try and get that to work, this is news to me. This info might fix an issue I know someone else was having. Thanks!