aa2zz6 Posted October 30, 2015 Posted October 30, 2015 (edited) In my script I created a parent child GUI. I set the $X and $Y coordinates as random variables and I included the ControlMove for the mouse to follow the Child GUI. I can't seem to get the ControlMove to move in the direction of the Child GUI. expandcollapse popup#include <WindowsConstants.au3> #include <IE.au3> HotKeySet("{ESC}", "Terminate") ;;==============================================================================;; ;;===============================GUI DESIGN======================================;; ;;==============================================================================;; ;;==============================================================================;; $width = 800 $height = 625 $hMain = GUICreate("COK", 1015, 585, @DesktopWidth / 2 - $width / 2, @DesktopHeight / 2 - $height / 2, _ $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN) $wPos = WinGetPos($hMain) GUISetState(@SW_SHOW,$hMain) $x = Random( 0, 500) $y = Random( 0, 500) $Child_GUI = GUICreate("Child", 100, 100, $x, $y, $WS_POPUP,BitOR($WS_EX_MDICHILD,$WS_EX_TRANSPARENT),$hMain) WinSetTrans($Child_GUI, "", 200) GUISetBkColor(0xfffaf0, $Child_GUI) GUISetState(@SW_SHOW, $Child_GUI) $WinLoc = WinGetPos($Child_GUI) MouseMove($WinLoc[0]+($WinLoc[2]/2),$WinLoc[1]+($WinLoc[3]/2),20) ;;==============================================================================;; ;;===============END==============GUI DESIGN====================================;; ;;==============================================================================;; ;;==============================================================================;; While 1 sleep(1000) WEnd Func Terminate() Exit EndFunc ;==>Terminate Edited October 30, 2015 by aa2zz6
JohnOne Posted October 30, 2015 Posted October 30, 2015 Make your script run, as it stands it does not. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
jdelaney Posted October 30, 2015 Posted October 30, 2015 (edited) Wait a tick...why are you passing in the window handle to be moved as a control...do you really just want to WinMove?Other than that, I suggest you click the links in your post (the blue functions), and read what the function does, and what params to pass into it. Edited October 30, 2015 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.
aa2zz6 Posted October 30, 2015 Author Posted October 30, 2015 The AutoIt v3 Window Info doesn't display any information of the child GUI so I was trying anything at this point. Everything works fine if I remove the control function out of the script beside the cursor not moving onto the child GUI. I tried the MouseMove but the cursor wouldn't move to the location. I'll revise this project after a good nights sleep.
AutoBert Posted October 30, 2015 Posted October 30, 2015 To move the Child-GUI you have to use WinMove.
aa2zz6 Posted October 30, 2015 Author Posted October 30, 2015 (edited) I solved my problem. I'll edit the code in the first post. Edited October 30, 2015 by aa2zz6
JohnOne Posted October 30, 2015 Posted October 30, 2015 Brilliant move, now the thread makes even absolutely no sense. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
aa2zz6 Posted October 30, 2015 Author Posted October 30, 2015 I can appreciate the help on the AutoIt forums. Feel free to delete this thread. The controlmove function probably wouldn't of worked.
Developers Jos Posted October 30, 2015 Developers Posted October 30, 2015 We don't delete threads unless it's spam as that is a living help resource.Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
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