Jump to content

Turbo Button ? Please help...


Recommended Posts

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 by CFraychineaud
Link to comment
Share on other sites

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 by nathanrich
Link to comment
Share on other sites

  • 10 months later...

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 :D

Link to comment
Share on other sites

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 :D

how about something like this:

CODE

hotkeyset("e","E")

while 1

sleep(1000)

wend

Func E()

hotkeyset("e")

send("eeeeeeee")

hotkeyset("e","E")

Endfunc

Link to comment
Share on other sites

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 :D

how about something like this:

CODE

hotkeyset("e","E")

while 1

sleep(1000)

wend

Func E()

hotkeyset("e")

send("eeeeeeee")

hotkeyset("e","E")

Endfunc

Link to comment
Share on other sites

how about something like this:

CODE

hotkeyset("e","E")

while 1

sleep(1000)

wend

Func E()

hotkeyset("e")

send("eeeeeeee")

hotkeyset("e","E")

Endfunc

it'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 by amigaman
Link to comment
Share on other sites

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 :D

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...