Pay attention to this option (look at screenshot below)

- ExpandNow.png (12.12 KiB) Viewed 9325 times
If it is ON then the action calculates the value and save the
result into variable
If it is OFF then the action
saves specified string as-it-is. So you get different values in different steps, because RoboTask calculates the value every time when you use this variable.
Also look at my two examples. These examples demonstrates this option.
1-st example. You get new value every time
Code: Select all
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|953684383
Comment=STRINGLIST
ContinueOnError=INTEGER|0
DoNotStopWhenShutdown=INTEGER|0
ExternalName=STRING|"Task185"
Hide=INTEGER|0
ID=INTEGER|-1830014808
LogOnAsUser=INTEGER|1
Name=STRING|"random (NOT fixed)"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
[Actions\Action1]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""VALUE"" with value ""{RandomValue(23)}"""
Params=FOLDER
[Actions\Action1\Params]
expand=STRING|"0"
varname=STRING|"VALUE"
varvalue=STRING|"{RandomValue(23)}"
[Actions\Action2]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""{value}"""
Params=FOLDER
[Actions\Action2\Params]
icon=STRING|"1"
msg0=STRING|"{value}"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"
[Actions\Action3]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""{value}"""
Params=FOLDER
[Actions\Action3\Params]
icon=STRING|"1"
msg0=STRING|"{value}"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"
[Actions\Action4]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""{value}"""
Params=FOLDER
[Actions\Action4\Params]
icon=STRING|"1"
msg0=STRING|"{value}"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"
2-nd example: you get the same value in different steps
Code: Select all
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|953684383
Comment=STRINGLIST
ContinueOnError=INTEGER|0
DoNotStopWhenShutdown=INTEGER|0
ExternalName=STRING|"Task186"
Hide=INTEGER|0
ID=INTEGER|679974520
LogOnAsUser=INTEGER|1
Name=STRING|"random (fixed)"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
[Actions\Action1]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""VALUE"" with value ""{RandomValue(23)}"""
Params=FOLDER
[Actions\Action1\Params]
expand=STRING|"1"
varname=STRING|"VALUE"
varvalue=STRING|"{RandomValue(23)}"
[Actions\Action2]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""{value}"""
Params=FOLDER
[Actions\Action2\Params]
icon=STRING|"1"
msg0=STRING|"{value}"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"
[Actions\Action3]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""{value}"""
Params=FOLDER
[Actions\Action3\Params]
icon=STRING|"1"
msg0=STRING|"{value}"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"
[Actions\Action4]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""{value}"""
Params=FOLDER
[Actions\Action4\Params]
icon=STRING|"1"
msg0=STRING|"{value}"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"