Jump to content
Sign in to follow this  
BlackBoxSoftwares

Get mouse position

Recommended Posts

BlackBoxSoftwares

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

Share this post


Link to post
Share on other sites
jdelaney

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 by jdelaney

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.

Share this post


Link to post
Share on other sites
BlackBoxSoftwares

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

Share this post


Link to post
Share on other sites
BlackBoxSoftwares

Thanks to both of you!! :) I have been strugling with this all night! I will surely give you guys credit in my next release :)

Share this post


Link to post
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
Sign in to follow this  

×