Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

do loop until 10 times

$
0
0

Hi all i an new to Autoit

i want to make a script that search for a pic and click it 

and repeate that for 10 times i had readed the help doc and some postes in the forums but no luck

the search and click itself is working but i cant get the loop to work

any ideas ?

AutoIt         
#include <ImageSearch.au3> $x = 0 $y = 0 $NUM = 0 While $NUM <= 10     Func start()     Do $Search = _ImageSearch('pic.bmp', 0, $x, $y, 0) if $Search = 0 Then sleep (1000) Until $Search = 1 If $Search = 1 Then  MouseMove($x, $y,10)  MouseClick("left", $x, $y, 1)  EndIf EndFunc WEnd

when i run this code it give the following error

 

C:\Users\Administrator\Downloads\ImageSearch\ImageSearch\tut.au3 (10) : ==> "While" statement has no matching "Wend" statement.:
Func start()

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>