gumbitha Posted August 31, 2008 Posted August 31, 2008 When I run this through SciTe's "Go" option, it works just fine. However, when I compile it using "Aut2Exe v3", it fails to detect my keystroke when I am ingame. What it does: Detects Control+Alt+Q. If Jedi academy is running (jamp.exe), it closes the process. #include <Misc.au3> #NoTrayIcon HotKeySet("^!q", "close") While 1 sleep(10) WEnd Func close() $PID = ProcessExists("jamp.exe") If $PID Then ProcessClose($PID) MsgBox(0, "Subaru's MBII closer", "MBII successfully closed!") Exit Else MsgBox(0, "Subaru's MBII closer", "MBII wasn't running!") exit Endif EndFunc
APPLEEATER Posted August 31, 2008 Posted August 31, 2008 When I run this through SciTe's "Go" option, it works just fine. However, when I compile it using "Aut2Exe v3", it fails to detect my keystroke when I am ingame. What it does: Detects Control+Alt+Q. If Jedi academy is running (jamp.exe), it closes the process. #include <Misc.au3> #NoTrayIcon HotKeySet("^!q", "close") While 1 sleep(10) WEnd Func close() $PID = ProcessExists("jamp.exe") If $PID Then ProcessClose($PID) MsgBox(0, "Subaru's MBII closer", "MBII successfully closed!") Exit Else MsgBox(0, "Subaru's MBII closer", "MBII wasn't running!") exit Endif EndFunc You could try the compile command in SciTe but that might not fix it either... The thing is... the hotkey might not work because the script is too busy *SLEEPING* and also if MDII is running then your computer is doing that too, so you could try changing it to Sleep(100) and it could work, it might just be because it needs SciTe to be running to detect it when the game is open too... Another Option is adding a GUI instead of just Sleep
gumbitha Posted August 31, 2008 Author Posted August 31, 2008 (edited) Yeah. I'm going to see _IsPressed() will work better. EDIT: Nope same behavior. Same with SciTe's compile option EDIT2: Removed sleep. Still no bananas. It detects the hotkey only when the game is NOT running, which is what I don't want. I might have to find a different way to tell autoit to close the process. Edited August 31, 2008 by gumbitha
APPLEEATER Posted August 31, 2008 Posted August 31, 2008 Yeah. I'm going to see _IsPressed() will work better.EDIT: Nope same behavior. Same with SciTe's compile option EDIT2: Removed sleep. Still no bananas. It detects the hotkey only when the game is NOT running, which is what I don't want. I might have to find a different way to tell autoit to close the process.Yes,the game is probably just blocking hotkeys,if this does not defeat the purpose of your program then you could make a GUI window with an EXIT Game Button
gumbitha Posted August 31, 2008 Author Posted August 31, 2008 Yes,the game is probably just blocking hotkeys,if this does not defeat the purpose of your program then you could make a GUI window with an EXIT Game ButtonI still don't see what having SciTe running is doing for it...I dont know of any good way to make a GUI window that you could focus on without using a hotkey
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now