Jump to content
Sign in to follow this  
au3scr

Need some help with FOR and clicking

Recommended Posts

au3scr

I haven't used autoit for long time so i forgot some programming :P

hi how i increase $y by 20,I want to make script that clicks 10 times and which increases every time $y by 20 but I cant get it done in thatway.ATM it increases it by about 150 but how i can increase mouse location by 20? i want 154 is start y location av every next time it will be added 20 so it will look like this.

mouseclick("right"190,154) , and next will be mouseclick("right"190,174) and next will be mouseclick("right"190,194) and so on.. mouseclick("right"190,214)

here is my original source

Sleep(3000)
$i = 0
$yi =154
$y = 0
for $i = 0 to 10
    $y = $yi + $y
MouseClick("right",89, $y)
sleep(100)
send("n")
sleep(300)
send("{enter}")
Sleep (1000)
$i = $i + 1 
$y = $y + 20
next

Share this post


Link to post
Share on other sites
Andreik

I haven't used autoit for long time so i forgot some programming :P

hi how i increase $y by 20,I want to make script that clicks 10 times and which increases every time $y by 20 but I cant get it done in thatway.ATM it increases it by about 150 but how i can increase mouse location by 20? i want 154 is start y location av every next time it will be added 20 so it will look like this.

mouseclick("right"190,154) , and next will be mouseclick("right"190,174) and next will be mouseclick("right"190,194) and so on.. mouseclick("right"190,214)

here is my original source

Sleep(3000)
$i = 0
$yi =154
$y = 0
for $i = 0 to 10
    $y = $yi + $y
MouseClick("right",89, $y)
sleep(100)
send("n")
sleep(300)
send("{enter}")
Sleep (1000)
$i = $i + 1 
$y = $y + 20
next
Sleep(3000)
$y =154
for $i = 0 to 10
MouseClick("right",89, $y)
$y += 20
sleep(100)
send("n")
sleep(300)
send("{enter}")
Sleep (1000)
next

When the words fail... music speaks

Share this post


Link to post
Share on other sites
au3scr

My great thanks to you. I havent seen this thing before +=.


Share this post


Link to post
Share on other sites
Andreik

My great thanks to you. I havent seen this thing before +=.

$y += 20
=
$y = $y + 20

When the words fail... music speaks

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.