Sign in to follow this  
Followers 0
real_tarantoga

How To Capture If A Windows Is Maximized?

7 posts in this topic

#1 ·  Posted (edited)

salvete, amices! :whistle:

i did'nt find a way to capture a window property like "IsMinimized" "IsMaximized".

there's a a perfect way to calculate a maximized windows using the @desktopheight and the WinGetClientSize("Program Manager"), but I fear a "rest risk" and i would really prefer another way to obtain the exact status ...

thank you very much for this product and eventually your better ideas than mine B)

greets, r_t

Edited by real_tarantoga

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Don't think theres a function to do it but this script could do it for you.

I only tested it in WinXP 1024*768.

It looks at the right top middle button ...

While 1
   ShowMenu(Windowstatus( Wingettitle("")))
   sleep(100)
Wend

Func Windowstatus($WinTitle)
   AutoItSetOption ("PixelCoordMode",1)
   $WinPos = WinGetPos ( $WinTitle)
   $maxc = PixelGetColor ($WinPos[2] - 45, 12)
   If $maxc <> 16777215 then 
      return ("Current window:" &  $WinTitle & " is in Restored mode")
   else
      return ("Current window:" &  $WinTitle & " is in Maximized mode")
   EndIF
EndFunc
;=====================================================
; Show Splash screen or update its content
;=====================================================
Func ShowMenu($l_msg)
   $W_Title="Test"
   if WinExists($W_Title) then
      ControlSetText($W_Title,"","Static1",$l_msg)
   else
      SplashTextOn($W_Title,$l_msg,600,200,1,1,4,"Courier",10,600)
   endif
   Return 0
EndFunc
Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

You could compare the window dimensions to the @DesktopHeight and @DesktopWidth if you know the position of the taskbar.... On Windows XP, ate least, WinGetPos("","Notification Area") ;taskbar info

Here are some related functions that that might help.


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

thank you both!

i will have a try of your ideas. i will give you feedback in the next (?) weeks.

unfortunately i've a big lack of time due to too much business :whistle: (well, better than a lack of work B) )

nice week-end!

r_t

ps: very interesting time zone differences between our answers :angry:

Edited by real_tarantoga

Share this post


Link to post
Share on other sites

AutoIt 3.0.94 has a function WinGetState :whistle:

Ahhh, so that's where you got that from. I saw your other post mentioning it and thought, "What's he talking about, there isn't a WinGetState function". Now I see (Haven't tried 3.0.94 obviously, since I'm using the tooltip-enabled version).

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  
Followers 0