BlackBoxSoftwares Posted March 17, 2014 Share Posted March 17, 2014 Hi guys, I'm new to this Forum and I'm very sorry if this has been asked before, but I'm asking it, because I couldn't find and answer on this. I have a Auto Login utility with my program ScreenGuard, but it has to be updated for win 8.1. Now, I want to know, how can I get the position of the mouse cursor when the user double clicks a control? Thanks in advance Link to comment Share on other sites More sharing options...
jdelaney Posted March 17, 2014 Share Posted March 17, 2014 (edited) try: #include <array.au3> #include <Misc.au3> While True If _IsPressed(01) Then While _IsPressed(01) WEnd $hTimer = TimerInit() While TimerDiff($hTimer)<500 If _IsPressed(01) Then While _IsPressed(01) WEnd $a = MouseGetPos() _ArrayDisplay($a) ExitLoop EndIf WEnd EndIf WEnd Change 500 to be less time, if half a second is too slow. Edited March 17, 2014 by jdelaney PilotPen 1 IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
BlackBoxSoftwares Posted March 17, 2014 Author Share Posted March 17, 2014 Thanks!!! This works great! Just some small question though, how can I display the value of $a. Say for instance in a message "You have double clicked the screen at $a"? Sorry, I'm very new to AutoIT still Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 17, 2014 Moderators Share Posted March 17, 2014 $a is an Array of the x,y coords. So you would need to display both indexes, like so: $a = MouseGetPos() MsgBox(0, "", "You clicked the screen at " & $a[0] & ", " & $a[1]) PilotPen 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
BlackBoxSoftwares Posted March 17, 2014 Author Share Posted March 17, 2014 Thanks to both of you!! I have been strugling with this all night! I will surely give you guys credit in my next release 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