Jump to content

Check for mouse input?


Guest Rhuno
 Share

Recommended Posts

Guest Rhuno

Hey folks, I was wondering if there was any way to check for a left mouse click by the user. I know you can send a mouseclick, but I need something to react to a user-initiated mouse click. Is there a mouse click code that can be used with the SetHotKey function? If so, please let me know. Thanks.

Link to comment
Share on other sites

Hey folks, I was wondering if there was any way to check for a left mouse click by the user.  I know you can send a mouseclick, but I need something to react to a user-initiated mouse click.  Is there a mouse click code that can be used with the SetHotKey function?  If so, please let me know.  Thanks.

<{POST_SNAPBACK}>

Try this, just replace the msgbox with some func

Opt("MouseCoordMode", 2);relative to active window
$WS_POPUP = 0x80000000;borderless window

GuiCreate("", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP)
GuiSetState(@SW_HIDE)
While 1
    $i = GuiGetCursorInfo()
    If $i[2] = 1 Then;Left mouse click initiated
        MsgBox(0,"Mouse Click","Mouse Left Click Initiated at X" & $i[0] & "  Y" & $i[1])
    EndIf
    Sleep(1)
Wend
Edited by bshoenhair
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...