Repeat Function

mactron

Пользователь
Регистрация
16.11.2014
Сообщения
93
Благодарностей
2
Баллы
8
I just done my bot which have 3 main steps:

1. Register
2. Login
3. Submission

So, my question is how I can repeat the last step n times..

Thanks
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
  • Спасибо
Реакции: mactron

peter

Пользователь
Регистрация
07.01.2012
Сообщения
40
Благодарностей
2
Баллы
8
What I most frequently do to implement loops is to create a list, and process its rows. Here for instance the list of sites you want to register to. Then I start to get the first line of it, and at the end of the loop, when the template knows that the actions made on webpages have been successful, then I get the first line of that list again, this time with the delete line option enabled. The list's option is set to save changes to file, so if the template gets no answer from the web page - which happens quite often - then by restarting the template, the loop will be restarted at the right point.
The loop ends when there will be no more rows from the list to get, so you connect further actions to the false exit point of the first get line from list box.
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
Bad end triggered only once. And no, you cannot start right from where you failed if logic of your template doesnt handle this error
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)