Jump to content


3 Button spam with one Button held down


  • Please log in to reply
5 replies to this topic

#1 Este

Este
  • Guests

Posted 10 July 2012 - 10:35 PM

Hi there, I'm looking for a little scrip that allows me to do what the title says.

I'm trying to make this work for Diablo3. Basically what I'm looking for is:

I hold down a button ("w" in this case) and three other buttons (1, 2 and left mouse button) will be spammed all the time. It has to ignore that I'm pressing shift (I'm using *).

Here is what I use atm:

#IfWinActive, Diablo III
$*w::
 While GetKeyState("w","p"){
  SendInput {1}{2}{RButton}
  sleep 50
 }
return

I just copied that from the RapidFire thread and played around with it until it worked (kinda).

It does work but it tends to get stuck on both, the W button and shift. Both can get stuck and I have to repress the affected one to make it stop.
(Shift is used to make the character stand still to cast from it's current position rather then walking into range or something).

Is there any efficient way to handle this? I played around with several variants and timings but at some point it always gets stuck.

I tried switching the Send mode, too. If I use just "Send" it will work just fine. But negate my holding down of Shift and just ignore it (see explanation above why this is not good when playing Diablo3).

Any help would be appreciated.

Regards,

Este

#2 Este

Este
  • Guests

Posted 10 July 2012 - 10:44 PM

Oh wow, hilarious first impression... I completely didn't see the whole gaming subforum.

/facepalm

Feel free to move or even delete this topic.

#3 MasterFocus

MasterFocus
  • Moderators
  • 4126 posts

Posted 11 July 2012 - 12:33 AM

I guess I'll suggest using Blind, just to see what happens.
#IfWinActive, Diablo III
$*w::
    While GetKeyState("w","P") {
        SendInput, [color=#FF0000]{Blind}[/color]12{RButton}
        Sleep, 50
     }
    [color=#BF8000]KeyWait, w[/color]
Return


#4 Este

Este
  • Guests

Posted 11 July 2012 - 01:18 AM

I guess I'll suggest using Blind, just to see what happens.

#IfWinActive, Diablo III
$*w::
    While GetKeyState("w","P") {
        SendInput, [color=#FF0000]{Blind}[/color]12{RButton}
        Sleep, 50
     }
    [color=#BF8000]KeyWait, w[/color]
Return



Hm, I can't say for sure yet but it seems to work like a charm. At least for the last 20mins of testing.

Awesome! Was it Blind that fixed it? Or the KeyWait? Or both together?

#5 MasterFocus

MasterFocus
  • Moderators
  • 4126 posts

Posted 11 July 2012 - 04:12 AM

I suppose KeyWait had no effect, since you were not getting a "maximum hotkeys" error. It's just prevention

Your Shift key was probably going crazy because, without {Blind}, it was automatically released to
perform SendInput every 50ms, so... yeah, that sounds like a good reason. :)

#6 biz79

biz79
  • Members
  • 1 posts

Posted 01 August 2012 - 09:33 PM

Hi there,

Thanks for this script, was pretty much what I needed. It works great (tweaked to spam 123) when I bind it to my keyboard.

However, it'll only work on my mouse (bound to w), if I remove $*. I have a logitech mx1100 with uberoptions. Not exactly sure what's wrong, but it's important that shift won't disturb this script. Anyone have any ideas? Would love to get this working with my mouse.

Here's what I'm using:
#IfWinActive, Diablo III
$*w::
While GetKeyState("w","P") {
SendInput, {Blind}123
Sleep, 50
}
KeyWait, w
Return

Thanks,
Biz

Edit: Added more clarifications