minimize window and then detecting it's minimized

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Stan001
Newbie
Posts: 5
Joined: Fri Apr 25, 2008 5:48 pm

minimize window and then detecting it's minimized

Post by Stan001 » Fri Apr 25, 2008 6:02 pm

I have looked and seen some info on minimizing windows. I would like to minimize a window and then once minimize detect it's minimized so it does not keep trying to minimize the window.

The thing I am missing and can't find is some why to detect that the window is now minimized and then skip that part of code unless it's not minimized.

This is what I have so far and everytime it executed it trys to minimize the window even though it's been minimized. I have it keep checking so that if the window is not minimized to minimize it.

label>startofcode

IfWindowOpen>C:\Downloads,min,z1

goto>z1

srt>min
WindowAction>2,C:\Downloads
end>min

label>z1
more code.

goto>startofcode

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Apr 25, 2008 8:45 pm

GetWindowHandle>C:\Downloads,hWnd
LibFunc>user32,IsIconic,r,hwnd
If>r=0
//window is NOT minimized
Else
//window IS minimized
Endif
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts