Jump to content

How to use WinGetClientSize

Recommended Posts

Guest joelp

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!

Link to post
Share on other sites
Guest joelp

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


I dont need the desktop resolution, i need the resolution of the game.
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...