wplate Posted August 2, 2004 Posted August 2, 2004 How can I center a window on the screen when it opens? Is there a calculation I can use or a script I can run that can figure the size of the screen the user is using and the Move/Resize Window appropriately?
Fitch Posted August 2, 2004 Posted August 2, 2004 Use the New Window script step with these parameters for Top and Left: ( Get ( ScreenHeight ) - Get ( WindowHeight ) ) /2 ( Get ( ScreenWidth ) - Get ( WindowWidth ) ) /2
Vaughan Posted August 3, 2004 Posted August 3, 2004 It can be a bit more complicated than that. Do you want the window centred on the screen, or centered in the middle of the users desktop (taking into account OS menu position and size etc)?
LaRetta Posted August 3, 2004 Posted August 3, 2004 Using Get(WindowDesktopHeight) and Get(WindowDesktopWidth) accounts for task bars - whether it's on the left, right, bottom or top and whether it is one or two rows. If you want a full window according to the space available remember to -2 px from left and right sides, ie, Get(WindowDesktopWidth)-2. If you set it the same size, it'll force the scroll to appear. I can only speak for Windows however. But this works well.
Recommended Posts
This topic is 7419 days old. Please don't post here. Open a new topic instead.
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