CFraychineaud Posted June 18, 2007 Posted June 18, 2007 (edited) Basically, I'm trying to create a turbo button functionality like the old school Nintendo controllers with the turbo button had. You press and hold down a button, and it presses either that button or another specified button over and over again at a given interval. I'm doing this for a game I play in which you have to constantly press buttons over and over again, and I'm trying to protect myself from getting carpal-tunnel. The game is World of Warcraft, I play in windowed mode, and want to send the commands/button presses directly into the windowed game. Ive created a macro in game which is allowed, which basically allows me to button mash over and over again to do the abilities and things i need to do for tanking. I'm trying to make it so i don't have to constantly press the button over and over, but rather can just press and hold in a button, and it will turbo button it for me until i release it. I've successfully created something that works, but it seems to use alot of CPU, and also occasionally I get a weird bug where my shift button, or Ctrl button sticks (it doesn't actually stick, its more like a toggled effect... like the numlock key), and I have to press it again to unstick it. #include <Misc.au3> $dll = DllOpen("user32.dll") While 1 If _IsPressed("23", $dll) Then ControlSend("World of Warcraft", "", "", "{1}") Sleep(150) EndIf WEnd DllClose($dll) Also, As the code is right now, its set to a specific button, and I have it go in and press just 1 button, it'd be nice if i could assign more turbo buttons as well. I also have another bit of code i run at the same time which would be nice if i could get it all into one program, but for now I'll just try and get this problem fixed first... heh Thanks in advance for any help you can give regarding this... Edited June 18, 2007 by CFraychineaud
CFraychineaud Posted June 21, 2007 Author Posted June 21, 2007 *bump* again... lot of views for no replies...
nathanrich Posted June 21, 2007 Posted June 21, 2007 (edited) Global $Paused HotKeySet("{END}", "TogglePause") HotKeySet("{HOME}", "Terminate") While 1 Sleep(100) WEnd Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) MouseClick("Left") WEnd EndFunc Func Terminate() Exit 0 EndFunc Take that concept and change it to target the window. That is a much better (and convenient) way to do it. That script does nothing until you unpause it by pressing (END), at which point it clicks over and over until you press (END) again. When you want the program to actually close, you press (HOME). I'm sure you can figure out how to make that press a key instead of click and send it. Edited June 21, 2007 by nathanrich
amigaman Posted April 26, 2008 Posted April 26, 2008 I have a similar problem. I'm kinda fond of old amiga games and I want to have some turbo buttons for some of them. I tried something on my own but it seems that HotKeySet only works when I only push one button at a time. Could anybody PLEASE give me an example for the "E" button, which starts "mashing" it for as long as I press and hold it. The script should also work for more than one button simultaniously. Thank you a great lot in advance
protoid Posted April 26, 2008 Posted April 26, 2008 amigaman said: I have a similar problem. I'm kinda fond of old amiga games and I want to have some turbo buttons for some of them. I tried something on my own but it seems that HotKeySet only works when I only push one button at a time.Could anybody PLEASE give me an example for the "E" button, which starts "mashing" it for as long as I press and hold it. The script should also work for more than one button simultaniously.Thank you a great lot in advance how about something like this:CODEhotkeyset("e","E")while 1 sleep(1000)wendFunc E() hotkeyset("e") send("eeeeeeee") hotkeyset("e","E")Endfunc
protoid Posted April 26, 2008 Posted April 26, 2008 amigaman said: I have a similar problem. I'm kinda fond of old amiga games and I want to have some turbo buttons for some of them. I tried something on my own but it seems that HotKeySet only works when I only push one button at a time.Could anybody PLEASE give me an example for the "E" button, which starts "mashing" it for as long as I press and hold it. The script should also work for more than one button simultaniously.Thank you a great lot in advance how about something like this:CODEhotkeyset("e","E")while 1 sleep(1000)wendFunc E() hotkeyset("e") send("eeeeeeee") hotkeyset("e","E")Endfunc
amigaman Posted April 26, 2008 Posted April 26, 2008 (edited) protoid said: how about something like this:CODEhotkeyset("e","E")while 1 sleep(1000)wendFunc E() hotkeyset("e") send("eeeeeeee") hotkeyset("e","E")Endfuncit's not about mashing the "e" button 8 (or 800) times, it's about mashing it for exactly as long as i hold it pressed. in addition, i must be able to "mash" or at least press other buttons without the "e" spam stopping. Edited April 27, 2008 by amigaman
JustinReno Posted April 27, 2008 Posted April 27, 2008 This is not your topic, so you do not need to push it. Ask your question in your own thread.
amigaman Posted April 27, 2008 Posted April 27, 2008 JustinReno said: This is not your topic, so you do not need to push it. Ask your question in your own thread.sorry for that, but it's basically the same issue ant i do not like to spam forums with threads for almost no reason at all. i just want to know if there is some convenient possibility to do that sort of thing so i can elaborate it for my games
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