AutoHotkey Community

It is currently May 27th, 2012, 11:31 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: August 15th, 2005, 1:15 am 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2545
I just put it together to give you an idea of how the commands work. It wasn't necessary to move the window to the top left but on some systems the last position will be remembered. Therefore, the next time the script is run it would seem as if it did nothing since the window would already be centered....

Since you mentioned the help file... There is an example included that centers a window under WinMove...
Quote:
Code:
; The following function centers the specified window on the screen:
CenterWindow(WinTitle)
{
   WinGetPos,,, Width, Height, %WinTitle%
   WinMove, %WinTitle%,, (A_ScreenWidth/2)-(Width/2), (A_ScreenHeight/2)-(Height/2)
}


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google Feedfetcher, Yahoo [Bot] and 20 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group