Jump to content

newbie variable array help (coords)


Recommended Posts

AU3-Guru's,

i'd need a little advise on how to deal with the following problem:

for now i declare 2 variables for a point on the screen like this:

Dim $posx=180

Dim $posy=100

and then later in the code use the following to click on this spot:

MouseClick("left",$posx,$posy)

...now, is there a way to declare a var like "Dim $pospix=180,100" and then just do "MouseClick("left",$pospix)" ? i'd really like to know this to clean up my code and make the creation of a gui easier. Thanks a lot !

...Fenster fährt mich Nüsse...
Link to comment
Share on other sites

AU3-Guru's,

i'd need a little advise on how to deal with the following problem:

for now i declare 2 variables for a point on the screen like this:

Dim $posx=180

Dim $posy=100

and then later in the code use the following to click on this spot:

MouseClick("left",$posx,$posy)

...now, is there a way to declare a var like "Dim $pospix=180,100" and then just do "MouseClick("left",$pospix)" ? i'd really like to know this to clean up my code and make the creation of a gui easier. Thanks a lot !

No, beacuse even when using array variables you have to define which variable in the array you are using for each step in the function like this:

MouseClick("left", $pospix[0], $pospix[1])

Arrays must also be created like this:

#include <Array.au3>

$pospix = _ArrayCreate ( $v_Val1, $v_Val2, ..., $v_Val21)

:)

Edited by Nomad
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...