How do you repeat a block of web actions a desired number of times?

jp1

Client
Регистрация
23.01.2011
Сообщения
234
Благодарностей
2
Баллы
0
This can't be done by number of threads or number of attempts etc because it's only part of the template I want repeating, not the whole template. I'd like to repeat a block of web actions as many times as the number of strings in a file I get strings from. I can get 'the number of strings actually contained in the file' as it's in the macro builder, but how would I apply this to a block of web actions? thanks
 

Hungry Bulldozer

Moderator
Регистрация
12.01.2011
Сообщения
3 441
Благодарностей
831
Баллы
113
You need to loop and run it as many times as lines in the file
 

backlinker

Новичок
Регистрация
25.03.2011
Сообщения
17
Благодарностей
2
Баллы
0
You need to create a "loop" by using Counters macro options.

Init your counter
Do your action
Counter +1
If counter < 250 (by example) then go to Do your action
else end
 

ziavra

Client
Регистрация
26.06.2009
Сообщения
116
Благодарностей
4
Баллы
0

jp1

Client
Регистрация
23.01.2011
Сообщения
234
Благодарностей
2
Баллы
0
Guys, a red dot false exit to a {-Counter.Get-|-count1-} < 4 doesn't work. Perhaps it's a bug. The green exit works fine. Also in http://help.zennolab.com/en/v3/zenno...html?cycle.htm why is it using a Set HTML to get the counter values? I used this:

Get Macro {-Counter.Set-|-count1-|-0-}
Stuff to do
Get Macro {-Counter.Add-|-count1-|-1-}

New web action
Get Macro {-Counter.Get-|-count1-} < 4

Positive exit back to 'stuff to do'. It works.
Negative exit to cnn.com. Doesn't happen. When it reaches 4 < 4, it just keeps going to the positive exit.

Also tried Get Macro {-Counter.Get-|-count1-}<4

And I tried
Get Macro {-Counter.Get-|-count1-} > 4
turning around the exits too but that also didn't work. What am I doing wrong?

<?xml version="1.0" encoding="utf-8"?>
<Project Name="cache.xml" ProxyFilter="" Flags="DLCTL_DLIMAGES, DLCTL_VIDEOS, DLCTL_BGSOUNDS, DLCTL_NO_SCRIPTS, DLCTL_NO_JAVA, DLCTL_NO_RUNACTIVEXCTLS, DLCTL_NO_DLACTIVEXCTLS, DLCTL_NO_FRAMES, CMD_ALLOWPOPUP, CMD_DISGUISE" Version="3.0">
<Step ID="●4●8●3●7●8●3●" Type="Web" x="108" y="51">
<Branch ID="cca-1510" Type="WebBrowser" PictureIndex="" Action="Set" Name="CMD_CLEARCOOKIE" Comment="Clearing cookies" OutGood="●8●6●4●2●9●7●|≡2≡6≡1≡1≡0≡6≡1≡3≡2≡">
<Parameters />
<Results />
</Branch>
</Step>
<Step ID="●8●6●4●2●9●7●" Type="Web" x="483" y="87">
<Branch ID="≡2≡6≡1≡1≡0≡6≡1≡3≡2≡" Action="Get" Type="Macros" PictureIndex="" Name="{-Counter.Set-|-count1-|-0-}">
<Parameters />
<Results />
</Branch>
<Branch ID="≡1≡5≡9≡8≡2≡9≡7≡4≡7≡1≡" Type="WebBrowser" PictureIndex="" Action="Set" Name="CMD_CLEARCACHE">
<Parameters>
<Value>{-FieldData.FieldData-|-●4●8●3●7●8●3●-|-cca-1510-}</Value>
</Parameters>
<Results />
</Branch>
<Branch ID="≡1≡5≡7≡7≡5≡7≡9≡7≡0≡3≡" Action="Get" Type="Macros" PictureIndex="" Name="{-Counter.Add-|-count1-|-1-}" OutGood="●2●3●7●2●1●6●|≡2≡6≡9≡8≡1≡4≡0≡3≡5≡">
<Parameters />
<Results />
</Branch>
</Step>
<Step ID="●2●3●7●2●1●6●" Type="Web" x="894" y="220">
<Branch ID="≡2≡6≡9≡8≡1≡4≡0≡3≡5≡" Action="Get" Type="Macros" PictureIndex="" Name="{-Counter.Get-|-count1-} &lt; 4" OutGood="●8●6●4●2●9●7●|≡1≡5≡9≡8≡2≡9≡7≡4≡7≡1≡" OutBad="●5●3●5●9●5●8●|≡1≡7≡4≡2≡0≡6≡9≡3≡2≡2≡">
<Parameters>
<Finder>
<Document />
<Form />
<Element>
<TabPath>page</TabPath>
</Element>
</Finder>
</Parameters>
<Results />
</Branch>
</Step>
<Step ID="●5●3●5●9●5●8●" Type="Web" x="1247" y="204">
<Branch ID="≡1≡7≡4≡2≡0≡6≡9≡3≡2≡2≡" Action="Set" Type="WebBrowser" PictureIndex="" Name="CMD_NAVIGATE">
<Parameters>
<Value>marca.com</Value>
</Parameters>
<Results />
</Branch>
</Step>
</Project>
 

ziavra

Client
Регистрация
26.06.2009
Сообщения
116
Благодарностей
4
Баллы
0

jp1

Client
Регистрация
23.01.2011
Сообщения
234
Благодарностей
2
Баллы
0

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