Mouse click problem

Ask gaming related questions (AHK v1.1 and older)
Nickowlas
Posts: 2
Joined: 11 Feb 2019, 04:35

Mouse click problem

11 Feb 2019, 05:43

Good day, everyone.
Can`t find solution by myself or in the topics.
Problem is next
While hold mouse button(left or right doesn`t matter) and click other one there occur mouse button release.
Site https://unixpapa.com/js/testmouse.html show process like this

mousedown which=1 button=0 buttons=1 ;lbutton down
mouseup which=1 button=0 buttons=0 \rbutton down
click which=1 button=0 buttons=0 \rbutton still down
mousedown which=1 button=0 buttons=1 \rbutton still down
mousedown which=3 button=2 buttons=3 \rbutton still down

Any ideas how solve this?
Rohwedder
Posts: 7647
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Mouse click problem

12 Feb 2019, 03:54

Hallo,
strange! Here with Firefox:
mousedown which=1 button=0 buttons=1
mousedown which=3 button=2 buttons=3
mouseup which=1 button=0 buttons=2
click which=1 button=0 buttons=2
mousedown which=1 button=0 buttons=3

Try this script. All currently pressed keys and buttons are displayed:

Code: Select all

#Persistent
#InstallKeybdHook
#InstallMouseHook
SetTimer, KeyCombination, 100
KeyCombination:
ToolTip, % KeyCombination()
Return
KeyCombination(ExcludeKeys:="")
{
    ExcludeKeys .= "{Shift}{Control}{Alt}{WheelUp}{WheelDown}"
    Loop, 0xFF
    {
        Key := Format("VK{:02X}",0x100-A_Index)
        IF !GetKeyState(Key,"P")
            Continue        
        Key := "{" GetKeyName(Key) "}"
        If !InStr(ExcludeKeys,Key)
            KeyCombination .= Key
    }
    Return, KeyCombination
}
Return
Nickowlas
Posts: 2
Joined: 11 Feb 2019, 04:35

Re: Mouse click problem

13 Feb 2019, 21:53

Rohwedder wrote:
12 Feb 2019, 03:54
Hallo,
strange! Here with Firefox:
mousedown which=1 button=0 buttons=1
mousedown which=3 button=2 buttons=3
mouseup which=1 button=0 buttons=2
click which=1 button=0 buttons=2
mousedown which=1 button=0 buttons=3

Try this script. All currently pressed keys and buttons are displayed:

Code: Select all

#Persistent
#InstallKeybdHook
#InstallMouseHook
SetTimer, KeyCombination, 100
KeyCombination:
ToolTip, % KeyCombination()
Return
KeyCombination(ExcludeKeys:="")
{
    ExcludeKeys .= "{Shift}{Control}{Alt}{WheelUp}{WheelDown}"
    Loop, 0xFF
    {
        Key := Format("VK{:02X}",0x100-A_Index)
        IF !GetKeyState(Key,"P")
            Continue        
        Key := "{" GetKeyName(Key) "}"
        If !InStr(ExcludeKeys,Key)
            KeyCombination .= Key
    }
    Return, KeyCombination
}
Return
Thank you, but seem`s it not work(
left click+right click
mousedown which=1 button=0 buttons=1
mouseup which=1 button=0 buttons=0
click which=1 button=0 buttons=0
mousedown which=1 button=0 buttons=1
mousedown which=3 button=2 buttons=3
left hold+right click
mousedown which=1 button=0 buttons=1
mouseup which=1 button=0 buttons=0
click which=1 button=0 buttons=0
mousedown which=1 button=0 buttons=1
mousedown which=3 button=2 buttons=3
mouseup which=1 button=0 buttons=2
click which=1 button=0 buttons=2
mouseup which=3 button=2 buttons=0
contextmenu which=3 button=2 buttons=0
mousedown which=1 button=0 buttons=1
right hold+left click
mousedown which=3 button=2 buttons=2
mouseup which=3 button=2 buttons=0
contextmenu which=3 button=2 buttons=0
mousedown which=1 button=0 buttons=1
mousedown which=3 button=2 buttons=3
mouseup which=1 button=0 buttons=2
click which=1 button=0 buttons=2
mouseup which=3 button=2 buttons=0
contextmenu which=3 button=2 buttons=0
mousedown which=3 button=2 buttons=2
aj65
Posts: 7
Joined: 25 Feb 2019, 13:12

Re: Mouse click problem

25 Feb 2019, 13:20

Hi guys,

am using this script below. am having a problem with it. When i use left click only, it works perfectly. But when combined with a right click or after a right click, Mostly inside a game, the script doesn't work at all.

#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%

F1::
Loop
{
Sleep, 10
GetKeyState, state, F1, P
if state = U ;-- The key has been released, so break out of the loop.
break
SoundBeep,200,250
Sleep, 10
Suspend
}
return
F3::Suspend

~LButton::
while GetKeyState("LButton")
{
DllCall("mouse_event", uint, 1, int, 0, int, 1, uint, 0, int, 0)
Sleep, 12
}
return
~MButton::
if GetKeyState("LButton")
{
Sleep, 13
MouseClick, Middle,,,, D
DllCall("mouse_event", uint, 0, int, 0, int, -1, uint, 0, int, 0)
}
return


F5::ExitApp

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 67 guests