Loop Problem

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
cangri
Newbie
Posts: 7
Joined: Sun May 29, 2005 6:26 pm

Loop Problem

Post by cangri » Sat Jun 04, 2005 8:19 pm

Run>C:\Archivos de programa\Mozilla Firefox\firefox.exe
WaitWindowOpen>something - Mozilla Firefox*
Wait>1
Random>4742,Result
ReadLN>C:\test.txt,%Result%,line
SetFocus>something - Mozilla Firefox*
Press tab *9
Send Character/Text>%line%
wait>.2
Press enter
wait>25


I need to repeat this 50 times, i mean loop it 50 times, can anyone help me?

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sun Jun 05, 2005 4:14 am

This has added a loop around your code, using LoopCount as a variable counter.

Code: Select all

Let>LoopCount=50
Let>k=0

Label>Loop
Let>k=%k%+1

Run>C:\Archivos de programa\Mozilla Firefox\firefox.exe
WaitWindowOpen>something - Mozilla Firefox*
Wait>1
Random>4742,Result
ReadLN>C:\test.txt,%Result%,line
SetFocus>something - Mozilla Firefox*
Press tab *9
Send Character/Text>%line%
wait>.2
Press enter
wait>25 

If>%k%<%LoopCount%,Loop
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts