Sign in to follow this  
Followers 0
kabalarian

WinGetClientSize

7 posts in this topic

I just did a search for "WinGetClientSize" and couldn't find any posts that helped me in the slightest ways. I call up a window to get it size, and no matter what happens it always gives me 800x600. The window is full-screen and i can get the windowed version of it to work fine.

$d2win = InputBox("Diablo II Title", "What is the title to your Diablo II Window?", "Diablo II")
WinWait($d2win)
WinExists($d2win)
WinActivate($d2win)
Sleep(1000)
$size = WinGetClientSize($d2win)
;WinActivate($d2win)
;WinMove($d2win, "", 0, 0)
MsgBox(0, "Size", $size[0] & " / " & $size[1])
If $size[0]=800 Then
    MsgBox(0, "Windowed", "Playing diablo in windowed mode.")
EndIf
If $size[0]=1024 Then
    MsgBox(0, "Full", "Playing Diablo in full-screen mode.")
EndIf

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Nope I am still returning 800x600 and i am not at 800x600 resolution for my desktop

EDIT: i have tried WinGetState also and that returned 15...so it knows its enabled, active, is visible and exists

EDIT2: So no one knows whats wrong with this??...

Edited by kabalarian

Share this post


Link to post
Share on other sites

Okay so instead I used PixelGetColor to determine if the window is full screen or not...working perfectly now.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

o,And If the user has its windows setting o 1024 it will think that your in full.

There isnt such think as 1024 for diablo its 640 and 800,800 is max.

Edited by kcd-clan

Visit mEMy programs made.Iul - IulG-V Console - G-V Console_RandomLetter - _RandomLetter()Saftey Kill - Saftey Killcolorzone() = colorzone()

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Don't worry...i got the thing working...i dont think ima send to many people just use it for my own personal usage and yea it is movable and can be played in windowed mode if you know where to look...

And my windows setting is at 1024 so...

Edited by kabalarian

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