Page 1 of 1

downloading files with varying account numbers

Posted: Mon Feb 02, 2015 8:42 pm
by rjlibunao
Hi,

I am new to robotask but thank you in advance for the help.

We have a number of sites that we have to login daily, we search by account numbers then download all files related to that account number. So I am trying to record a macro to mimic my mouse clicks and it works on one account. I know i may have to make a file with all the account numbers in every line, insert the next account number, insert it in the macro, finish, reset, loop and round robin on the next account number.

Now the question. How do I achieve this? make a variable, ok so say i make a variable Acctnum= {#TextFile(file_name)}, but how do i make it go round robin?

Many thanks again!

RJ

Re: downloading files with varying account numbers

Posted: Tue Feb 03, 2015 12:41 pm
by Oleg
This is ordinary Text Loop
The loop processes all text line-by-line

The algorithm is simple:

Code: Select all

Text Loop
   .....
   Put here some necessary steps 
   .....
End Loop
The loop get the next line from the text and perform all steps within the loop. The loop ends when it processes the last line.

Also see below the simple example how to use the Text loop

Code: Select all

[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|317955339
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task13"
Hide=INTEGER|0
ID=INTEGER|212491790
LogOnAsUser=INTEGER|1
Name=STRING|"Text Loop..."
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER

[Actions\Action1]
ActionID=STRING|"A_LOOP_TEXT"
Enabled=INTEGER|-1
Name=STRING|"Text Loop"
Params=FOLDER

[Actions\Action1\Params]
destvar=STRING|"LINE"
line0=STRING|"This is sample text"
line1=STRING|"Line #1"
line2=STRING|"Line #2"
line3=STRING|"Line #3"
linecount=STRING|"4"
sourcetext=STRING|"1"

[Actions\Action2]
ActionID=STRING|"A_MISC_COMMENT"
Enabled=INTEGER|-1
Name=STRING|"//This is example of some step"
Params=FOLDER

[Actions\Action2\Params]
comment=STRING|"This is example of some step"

[Actions\Action3]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""{Line}"""
Params=FOLDER

[Actions\Action3\Params]
icon=STRING|"1"
msg0=STRING|"{Line}"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"

[Actions\Action4]
ActionID=STRING|"A_MISC_COMMENT"
Enabled=INTEGER|-1
Name=STRING|"//The last step in the loop"
Params=FOLDER

[Actions\Action4\Params]
comment=STRING|"The last step in the loop"

[Actions\Action5]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"

Save the text of the task into a file and use menu Task->Import to import the task into RoboTask.

Re: downloading files with varying account numbers

Posted: Tue Feb 03, 2015 3:54 pm
by rjlibunao
thank you i will try it

Re: downloading files with varying account numbers

Posted: Tue Feb 03, 2015 5:02 pm
by rjlibunao
how do i output the {LINE} var to the form space on the website?

Re: downloading files with varying account numbers

Posted: Tue Feb 03, 2015 5:54 pm
by Oleg
For example you can use Send Keystrokes action