AutoHotPie icon indicating copy to clipboard operation
AutoHotPie copied to clipboard

Autohotpie cant trigger AHK scripts

Open Forikundo opened this issue 2 years ago • 6 comments

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.

Forikundo avatar Apr 07 '22 21:04 Forikundo

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.

dumbeau avatar Apr 07 '22 21:04 dumbeau

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

Forikundo avatar Apr 07 '22 21:04 Forikundo

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.

thatsaxi avatar Jun 18 '22 10:06 thatsaxi

@thatsaxi Would you be willing to share these 4 scripts with me? Send to [email protected] 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.

dumbeau avatar Jun 18 '22 11:06 dumbeau

Will do!

thatsaxi avatar Jun 18 '22 12:06 thatsaxi

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.

thatsaxi avatar Jun 19 '22 06:06 thatsaxi