Lbutton command ruins regular click Topic is solved

Ask gaming related questions
Eros

Lbutton command ruins regular click  Topic is solved

22 Jan 2018, 03:15

Hello, I'm wondering why when I use the following script windows no longer recognizes my left mouse button down as a click. Why?

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Also, this pause doesn't work and I'd like to know why as well. I'm trying to make one keybind to turn it on or off on middle mouse wheel down. Main problem is the click though. Ty in advance!
BoBo
Posts: 2515
Joined: 13 May 2014, 17:15

Re: Lbutton command ruins regular click

22 Jan 2018, 03:29

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

Not tested.
User avatar
evilC
Posts: 4337
Joined: 27 Feb 2014, 12:30

Re: Lbutton command ruins regular click

22 Jan 2018, 08:42

It does not recognize lbutton as a click because you blocked lbutton.
lbutton:: will fire the code and block lbutton.
~lbutton:: will fire the code and NOT block lbutton.

Also I doubt you want this code

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


On the 3rd press of lbutton, no key will be sent. All it will do is set lbutton_count to 0.
Also, the code is CPU inefficient, as you do not use if/else. If lbutton_count is 1, it cannot also be 2, so no point in repeating the if check.

I think you probably want:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Hell, you do not even need the if blocks anyway, just do

Code: [Select all] [Download] GeSHi © Codebox Plus

lbutton::	
lbutton_count++
If (lbutton_count > 2) {
lbutton_count := 1
}
Send % 4 - lbutton_count
Return

Return to “Gaming”

Who is online

Users browsing this forum: Sylvenia and 8 guests