Katie_Deely

WinMove isn't working

9 posts in this topic

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!

Share this post


Link to post
Share on other sites



you need to add checks and wait points.

winexists

and

winwait


 

Spoiler

shoot_zpsfd329d66.png
dontbelieveeverythingyouthink_zps0e1e900

Madness is the first step to understanding...

Share this post


Link to post
Share on other sites

thanksss

Share this post


Link to post
Share on other sites
10 minutes ago, Somerset said:

you need to add checks and wait points.

winexists

and

winwait

That doesn't change anything :( 

Share this post


Link to post
Share on other sites

Also, all MouseMove() that follow after WinMove() aren't executed.

Share this post


Link to post
Share on other sites

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


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

can u take a look to my thread? i see ur good with that

Share this post


Link to post
Share on other sites

Oh, thanks :D It works now :) 

Share this post


Link to post
Share on other sites

#9 ·  Posted (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 by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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