Jump to content
Sign in to follow this  
Katie_Deely

WinMove isn't working

Recommended Posts

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

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

Share this post


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

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

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...