aa2zz6

How would you move mouse inside GUI?

4 posts in this topic

#1 ·  Posted (edited)

How would you move mouse inside GUI using coodinates? I used coordinate mode > Window] to get the coodinate for inside the GUI. The problem is that the mouse doesn't move inside when it's executed.

The AutoIt v3 Window Info:

Title: Example

Class: AutoIt v3 GUI

#include <GUIConstantsEx.au3>

Example()

Func Example()
    ; Create a GUI with various controls.
    Local $hGUI = GUICreate("Example", 300, 200)

    ; Display the GUI.
    GUISetState(@SW_SHOW, $hGUI)

    Local $iPID = 0

    MouseMove(156,98,1)

    ; Loop until the user exits.
    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop
        EndSwitch
    WEnd
    ; Delete the previous GUI and all controls.
    GUIDelete($hGUI)
    ; Close the Notepad process using the PID returned by Run.
    If $iPID Then ProcessClose($iPID)
EndFunc   ;==>Example

 

Edited by aa2zz6

Share this post


Link to post
Share on other sites



Hi @aa2zz6, try Option MouseCoordMode


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

First off, make sure your window is active, and then include this at the top of your script:

AutoItSetOption("MouseCoordMode",2)

 

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

Thanks for the feedback. Works now!

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