Jump to content
Sign in to follow this  
DNnlee

question about using variables

Recommended Posts

DNnlee

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
DNnlee

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
Zedna

$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
DNnlee

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.