Katie_Deely Posted May 21, 2016 Posted May 21, 2016 My program should open a window and move it to the top-left corner of the desktop. ShellExecute("C:\Windows\System32\mmc.exe", "compmgmt.msc", "System Tools") ; opens "Computer Management" Local $array = WinGetPos("Computer Management") ; gets X-position, Y-position, height and width as an array WinMove("Computer Management", "", 0, 0, $array[2], $array[3], 5) ; should move the window to (0, 0) but doesn't Exit Well, it doesn't get moved. The window stays where it was opened. What am I doing wrong? Thanks!
Somerset Posted May 21, 2016 Posted May 21, 2016 you need to add checks and wait points. winexists and winwait
Katie_Deely Posted May 21, 2016 Author Posted May 21, 2016 10 minutes ago, Somerset said: you need to add checks and wait points. winexists and winwait That doesn't change anything
Katie_Deely Posted May 21, 2016 Author Posted May 21, 2016 Also, all MouseMove() that follow after WinMove() aren't executed.
Developers Jos Posted May 21, 2016 Developers Posted May 21, 2016 Try: #RequireAdmin ShellExecute("C:\Windows\System32\mmc.exe", "compmgmt.msc", "System Tools") ; opens "Computer Management" WinWait("Computer Management") Local $array = WinGetPos("Computer Management") ; gets X-position, Y-position, height and width as an array WinMove("Computer Management", "", 0, 0, $array[2], $array[3], 5) ; should move the window to (0, 0) but doesn't 22 minutes ago, claudius said: thanksss Meaning? 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.
claudius Posted May 21, 2016 Posted May 21, 2016 can u take a look to my thread? i see ur good with that
Developers Jos Posted May 21, 2016 Developers Posted May 21, 2016 (edited) 8 minutes ago, claudius said: can u take a look to my thread? i see ur good with that You are kidding right? You posted your question in 3 threads and now you come here to pollute this thread with your question? go back to your own thread and be patient! Jos Edited May 21, 2016 by 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