Sign in to follow this  
Followers 0
Guest joelp

How to use WinGetClientSize

3 posts in this topic

ok i've just begun programming with autoit and i've written a little program to log in automatically to a game.

i wanted this program to be able to be used by other people that use different screen resolutions so i tried to use WinGetClientSize to find their game resolution and change the program accordingly

however whenever i try to use the function and the values it returns it gives me errors such as subscript used in non-array variable, number of subscript exceeded array elements etc etc

i've tried changing the code many ways to get this to work but it simply doesnt work

can someone tell me how i can use this?

Dim $size[2][2]
$size = WinGetClientSize("ROSE online")
$width = $size[0]
$length = $size[1]

If $width == 1280 And $length == 1024 Then $reso = 1
If $width == 1024 And $length == 768 Then $reso = 2

If $reso == 1 Then size1280()
If $reso == 2 Then size1024()

this is one of the codes i tried, any help would be great!

Share this post


Link to post
Share on other sites



Look at the functions @DesktopWidth and @DesktopHeight to solve your problem :).


[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

Look at the functions @DesktopWidth and @DesktopHeight to solve your problem :).

<{POST_SNAPBACK}>

I dont need the desktop resolution, i need the resolution of the game.

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