Penny Posted October 5, 2009 Posted October 5, 2009 (edited) Hey again, the script I'm making needs to be able to run in multiple resolutions and OSs, as such I need to know what's the height of a maximized window (that is, excluding the taskbar, however tall it might be) Local $g = GUICreate("MAXIMIZED",-1,-1,-1,-1,BitOR($GUI_SS_DEFAULT_GUI,$WS_MAXIMIZEBOX)) GUISetState(@SW_SHOW) Sleep(800) GUISetState(@SW_MAXIMIZE) Sleep(1500) ConsoleWrite(@DesktopWidth & ". h: " & @DesktopHeight & @CRLF) how would I get the window's actual height from there? also I would actually like to have the top/left/right/bottom of the form. Edited October 5, 2009 by Penny
Penny Posted October 5, 2009 Author Posted October 5, 2009 (edited) I tried using _WinAPI_GetWindowPlacement but that doesn't work with the maximized window, it gives me the normal-state coords. basically what I want is the Position / Size as given by the Window Info utility by AutoIt. Edited October 5, 2009 by Penny
Mison Posted October 5, 2009 Posted October 5, 2009 (edited) Hi, try WinGetClientSize... Local $g = GUICreate("MAXIMIZED",-1,-1,-1,-1,BitOR($GUI_SS_DEFAULT_GUI,$WS_MAXIMIZEBOX)) GUISetState(@SW_SHOW) Sleep(800) GUISetState(@SW_MAXIMIZE) Sleep(1500) ConsoleWrite(@DesktopWidth & ". h: " & @DesktopHeight & @CRLF) $win_size = WinGetClientSize("MAXIMIZED") MsgBox(0,"",$win_size[0]&" x "&$win_size[1]) Edited October 5, 2009 by Mison Hi ;)
Recommended Posts
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