Sign in to follow this  
Followers 0
Shonnie

WinGetState and Diablo II

3 posts in this topic

#1 ·  Posted (edited)

If Not WinActive("Diablo II","") Then WinActivate("Diablo II","")
WinWaitActive("Diablo II", "")

$state = WinGetState("Diablo II")
If BitAnd($state, 32) Then
    MsgBox(0, "Example", "Window is maximized")
Else
    MsgBox(0, "Example", "um...")
EndIf

ALWAYS returns "um..." even when its fullscreen.

I'm starting to think its Diablo II's fault.

And another question:

Is there anything that could emulate WinGetSize?

Since I think that would work better than WinGetState for this cause...

^.^

Edited by Shonnie

Share this post


Link to post
Share on other sites



Fullscreen and maximized are two different things

Maximized means that you have well.. maximized that window (middle button in window title bar)

Having detect fullscreen is a bit more complicated tho.


I code bots :: Need a bot? :: xythec@gmail.com

Share this post


Link to post
Share on other sites

Fullscreen and maximized are two different things

Maximized means that you have well.. maximized that window (middle button in window title bar)

Having detect fullscreen is a bit more complicated tho.

Is there a way i can tell if its maxinized vs. restored?

And what about detecting client size?

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