dumbeau / AutoHotPie

Radial menus in Windows, aka PIE MENYOOS!
MIT License
330 stars 17 forks source link

Autohotpie cant trigger AHK scripts #43

Open Forikundo opened 2 years ago

Forikundo commented 2 years ago

Hi again! sorry for making another issue but I think that maybe this one is easy to fix

I tried to trigger from AHP some AHK script, the classic one with the btw= by the way. I set the AHP to perform b then t then w then space but as I was afraid it didnt trigger anything. Probably because the same problem than the issue before. And that is that AHK scrips cant trigger other scripts wihtout being sendlevel or #inputlevel. Idk how difficult would be to change that and if that would bring problems.

dumbeau commented 2 years ago

You could also put the desired function in a standalone AHK script and use the "Run File" function in AHP.

I don't think it would be problematic to add a global #InputLevel setting to AHP. I'll try adding that and seeing if it causes any problems.

Forikundo commented 2 years ago

Thank u for the suggestion! tomorrow ill try to do that. thanks!

thatsaxi commented 2 years ago

I'm having the same issue. I have tried to execute 4 working scripts, they work when clicked but not when run from AutoHotPie. One is a .bat that renames a folder, the other is an ahk script that does the same. I've tried elevating privileges, no idea why it won't execute. It did work once with a mkdir script but not rmdir and not at all with renaming.

dumbeau commented 2 years ago

@thatsaxi Would you be willing to share these 4 scripts with me? Send to caspergilles@gmail.com if so. I think I've run into this issue before and it was an issue with the way scripts were targeting filepaths when run by an external program. Maybe try a a message box to show the filepath being renamed or removed.

thatsaxi commented 2 years ago

Will do!

thatsaxi commented 2 years ago

I tried .exe converted scripts, still no dice. Perhaps the function itself needs some elevation in privilege or something. All scripts work when clicked, not when executed. I might try executing the commands from the user function folder.