Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Right click + Left click hotkey



  • Please log in to reply
2 replies to this topic
th4drummer
  • Members
  • 28 posts
  • Last active: Jun 04 2015 09:36 PM
  • Joined: 02 Feb 2013

I've been working on a script that would allow me to do something in the lines of:

Rbutton & Lbutton::
Send a
Click
Return

This works as expected, but of course, it retains right click as a modifier and that's a problem.

I also tried adding ~ at the beginning (so it would ignore the modifier status), but that's not what I need. It also right clicks upon me pressing right click, at the beginning of the script and also only presses a, ignorng the click within the script

Someone suggested I added Rbutton::Rbutton at the end, after return, but that didn't work for me.
 

What I'm doing, actually, is making a hotkey for attack-clicking in Dota to add to my script list. Some heroes have weird spell hotkeys and it's sometimes quite uncomfortable to also keep a finger on the A key, or I just want to drink some water, but not lose my denying capabilities. Just figure I'd simplify that a little bit.
 

I also considered some sort of IF command, which would be more complicated, but if it worked...Something like Rubutton:: IF Rbutton is pressed, pressing Lbutton would trigger "a" and a left click, else, just click Rbutton normally. I don't exactly know how this would work, but it sorta makes sense in my mind.

 

 

So, what I want is something that, when I right and left click, one after the other, presses a and left clicks, but also when I only right click, it would work normally (yeah, normal mouse, so...)

 

Any help would be appreciated.

 

Thanks in advance.



HotKeyIt
  • Moderators
  • 7439 posts
  • Last active: Jun 22 2016 09:14 PM
  • Joined: 18 Jun 2008
✓  Best Answer

Try something like this:

$RButton::
  KeyWait,LButton,DT0.3
  If !ErrorLevel {
    KeyWait,RButton
    Send {Click}a
    return
  }
  Send {RButton Down}
  KeyWait,RButton
  Send {RButton Up}
Return


th4drummer
  • Members
  • 28 posts
  • Last active: Jun 04 2015 09:36 PM
  • Joined: 02 Feb 2013

Yup, it's working.

 

Thanks.

 

I just modified DT to 0.1, reversed {Click} and a, so it would be "Send a{Click}" and tested it ingame. It works.