Jump to content
Sign in to follow this  

How to use WinGetState

Recommended Posts


The example WinGetState script in the documentation isn't working for me. Could someone better explain how this works?

Share this post

Link to post
Share on other sites

Hi! Its not hard, example:

$title = "[Class:Notepad]"



If BitAND(WinGetState($title), 2) Then ;If winsow is visible
    MsgBox(0, "Msg", "Now notepad window are minimized", 2)
    WinSetState($title, "", @SW_MINIMIZE)


If BitAND(WinGetState($title), 16) Then ;If winsow is minimized
    MsgBox(0, "Msg", "Now notepad window are restored", 2)
    WinSetState($title, "", @SW_RESTORE)
:) Edited by rasim

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.