Guest Rhuno Posted April 9, 2005 Share Posted April 9, 2005 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 More sharing options...
bshoenhair Posted April 9, 2005 Share Posted April 9, 2005 (edited) 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 funcOpt("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 April 9, 2005 by bshoenhair Link to comment Share on other sites More sharing options...
Guest Rhuno Posted April 9, 2005 Share Posted April 9, 2005 Awesome, that did the trick! Thanks for your help. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now