August 2, 200421 yr 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?
August 2, 200421 yr Use the New Window script step with these parameters for Top and Left: ( Get ( ScreenHeight ) - Get ( WindowHeight ) ) /2 ( Get ( ScreenWidth ) - Get ( WindowWidth ) ) /2
August 3, 200421 yr 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)?
August 3, 200421 yr 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.
Create an account or sign in to comment