Sign in to follow this  
Followers 0
g_BonE

newbie variable array help (coords)

4 posts in this topic

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...

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

still quite a good tip. i'll try and implement. thanks a bunch mate !


...Fenster fährt mich Nüsse...

Share this post


Link to post
Share on other sites

No problem, glad to be of assistance. :)


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