Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

3 Button spam with one Button held down


  • Please log in to reply
5 replies to this topic
Este
  • Guests
  • Last active:
  • Joined: --
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

Este
  • Guests
  • Last active:
  • Joined: --
Oh wow, hilarious first impression... I completely didn't see the whole gaming subforum.

/facepalm

Feel free to move or even delete this topic.

MasterFocus
  • Moderators
  • 4323 posts
  • Last active: Jan 28 2016 01:38 AM
  • Joined: 08 Apr 2009
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

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Antonio França -- git.io -- github.com -- ahk4.net -- sites.google.com -- ahkscript.org

Member of the AHK community since 08/Apr/2009. Moderator since mid-2012.


Este
  • Guests
  • Last active:
  • Joined: --

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?

MasterFocus
  • Moderators
  • 4323 posts
  • Last active: Jan 28 2016 01:38 AM
  • Joined: 08 Apr 2009
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. :)

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Antonio França -- git.io -- github.com -- ahk4.net -- sites.google.com -- ahkscript.org

Member of the AHK community since 08/Apr/2009. Moderator since mid-2012.


biz79
  • Members
  • 1 posts
  • Last active: Aug 01 2012 09:30 PM
  • Joined: 01 Aug 2012
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