pause variable

Discuss RoboTask here
Post Reply
rgonzalez
Posts: 41
Joined: Fri Nov 26, 2010 10:19 am

pause variable

Post by rgonzalez »

Is there a way to pause a task x amount of seconds carried by a variable? :|

For example:


Do something
x = 54*i seconds
Pause x seconds
Do something
x = 15*i-2 seconds
Pause x seconds



Thank you!
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: pause variable

Post by Oleg »

Look at the example below.
You can do this by using Simple loop

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|2099193306
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task837"
Hide=INTEGER|0
ID=INTEGER|2072715731
LogOnAsUser=INTEGER|1
Name=STRING|"set necessary delay in seconds"
OnErrorTaskID=INTEGER|0
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_MISC_COMMENT"
Enabled=INTEGER|-1
Name=STRING|"//set necessary delay in seconds"
Params=FOLDER

[Actions\Action1\Params]
comment=STRING|"set necessary delay in seconds"

[Actions\Action2]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""NUM"" with value ""5"""
Params=FOLDER

[Actions\Action2\Params]
expand=STRING|"0"
varname=STRING|"NUM"
varvalue=STRING|"5"

[Actions\Action3]
ActionID=STRING|"A_LOOP_SIMPLE"
Enabled=INTEGER|-1
Name=STRING|"Simple Loop"
Params=FOLDER

[Actions\Action3\Params]
begin=STRING|"1"
end=STRING|"{num}"

[Actions\Action4]
ActionID=STRING|"A_GENERAL_PAUSE"
Enabled=INTEGER|-1
Name=STRING|"Delay 1000 ms"
Params=FOLDER

[Actions\Action4\Params]
delay=STRING|"10"

[Actions\Action5]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
Probably it's necessary to change Pause action in order to simplify the algorithm

Save the task text into a file and use menu Task->Import to import to RoboTask
Oleg Yershov
rgonzalez
Posts: 41
Joined: Fri Nov 26, 2010 10:19 am

Re: pause variable

Post by rgonzalez »

thanks that works great :D
kristalharri
Posts: 1
Joined: Mon Feb 03, 2014 6:27 am

Re: pause variable

Post by kristalharri »

I agree..I am gonna execute this...It's favorably works for me...I have never seen such an easy method to use pause variable..It is mind bogglingly best...!!! :)
Post Reply