Sign in to follow this  
Followers 0
DNnlee

question about using variables

5 posts in this topic

if i set $k = random(0,10)

mouseclick("left", $k, $k)

mouseclick("left", $k, $k)

mouseclick("left", $k, $k)

does it get a random number everytime it reads $K, or does it read $k once, and use same numner over and over again?

Share this post


Link to post
Share on other sites

random every time. Did you test it with a msgbox?

i tested it with mousemove, and i'd gimmie same one everytime though

Share this post


Link to post
Share on other sites

$k = random(0,10)
mouseclick("left", $k, $k)
$k = random(0,10)
mouseclick("left", $k, $k)
$k = random(0,10)
mouseclick("left", $k, $k)

or

RandomClick()
RandomClick()
RandomClick()

Func RandomClick()
  $k = random(0,10)
  mouseclick("left", $k, $k)
EndFunc

Share this post


Link to post
Share on other sites

i tested it with mousemove, and i'd gimmie same one everytime though

how do i get it to do something like

$K = random(6, 12)

while 1

$J = 0

Do

mouseclick("left", 100,100)

sleep(1000)

$J = $J+1

until $J = $K

wend

i want a random $k everytime the loop finsihes

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