Disable mouse with built in autoclicker
anyone???? i just want to disable rapid fire button and make a new sinlge button. the problem is that the rapid fire button and the left mouse button, recognised as LMB1 (left mouse button 1). How can i seperate them as different buttons?????
Identify the button if you can. Look at Key History when you right click on a running script's tray icon and see what keys it detects you pressing.
If it is truly indistiguishable from the LButton, try this:
$LButton:: If (A_TimeSincePriorHotkey<300) count++ else count:=0 If (count>5) MsgBox Hello If (count=0) SetTimer, SendLButton, -300 return SendLButton: If count=0 Send {LButton} return
$ modifier prevents recursion. A_TimeSincePriorHotkey, If, else, MsgBox, Send, KeyList. SetTimer.
This script is far from perfect. I can see it is going to prevent click and drag, and it might prevent double click. You can see this is not going to be easy if there is not a separate name for your key.
Of note, your key may be called using the vk__sc___
name, and not something like LButton or XButton1.
Edit: Whoops, I only wanted a single click to send LButton. As it was, a single click wouldn't have done anything (I had count>0). I fixed that. I think.
Additionally, I'll say you might be able to do this on the label:
SendLButton: If !GetKeyState("LButton","P") && count=0 Send {LButton} else { Send {Lbutton down} KeyWait, LButton } return
Edited by Exaskryz, 02 November 2015 - 06:50 PM.
Both left mouse button and rapid fire, recognised as LButton
I just got a recent idea that maybe will work. No idea of course. It came while I was editing my previous post - did you try out that idea already? Regardless, I did make a critical typo fix, and I think if it works it may be worthwhile to use the suggested alternative behavior. Though that's untested.
Anyway, so, this idea is maybe the GetKeyState() can be used with a #If.
#If !GetKeyState("LButton","P") LButton::MsgBox Is this your rapid fire button?
In my testing the MsgBox does not appear. So it should not block your regular LButton. But maybe it can be used to detect the rapid fire button. I'm not entirely sure, but think it's worth a shot.
both again recognised as LButton. So i think there is no way to change the built in rapid fire button an a new single button. Anyway. Thank you very much.