stonev Posted 2 hours ago Posted 2 hours ago 33 minutes ago, JoeViking245 said: Try LCtrl instead of LControl Thanks for the idea. Unfortunately, the same "invalid hotkey" error remains. I tried testing a bit further, abandoning the %FireKey% variable altogether and just hard-coding {LCtrl} in the appropriate places. The good news is that when I run the script with a keylogger/checker, it acts as intended: F1 turns on the script with tooltip confirmation, pressing left control begins an auto press of left control every 50ms or so, with the ability to press left control during the sequence without interrupting it, and pressing F1 again turns it off (with tooltip confirmation). The bad news is that trying this with an actual game (Forgotten Worlds) does *not* work. I can see the tooltip when I press F1, but pressing left control doesn't seem to start the firing sequence. I've heard-tell of AHK and MAME not playing well together; maybe this is one of those instances? Quote
JoeViking245 Posted 1 hour ago Posted 1 hour ago 15 minutes ago, stonev said: I've heard-tell of AHK and MAME not playing well together; maybe this is one of those instances? Some emulators need a more "literal" or "defined" key press. Can try adding to the top if the script SetKeyDelay, 0, 50 1 Quote
stonev Posted 1 hour ago Posted 1 hour ago 7 minutes ago, JoeViking245 said: Some emulators need a more "literal" or "defined" key press. Can try adding to the top if the script SetKeyDelay, 0, 50 Progress! So adding that line made it work in Mame!!! Just to clean up the script a little... I still can't seem to use the %FireKey% variable on the first line of the Autofire loop. So to snip out part of my code: <FireKey := "{LCtrl}"> and <Send %FireKey%> work in tandem. However, if I use <~%FireKey%::>, I get the "invalid hotkey" error on that line. The only way to fix this is to change that line to <~LCtrl::>, that is, hard-code the key instead of using the variable. Not a deal-breaker by any means, but still a little strange. Quote
stonev Posted 7 minutes ago Posted 7 minutes ago Additionally, I've added the following to the bottom of the script: Esc::ExitApp Unfortunately, this kills the script with the first Esc and kills the game (as usual) with the second. Is there a way to kill the script and the game with a single press? Or better yet, kill the AHK script as a result of Mame exiting? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.