Jump to content

How would you move mouse inside GUI?


aa2zz6
 Share

Recommended Posts

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
Link to comment
Share on other sites

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.
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...