Page 1 of 1

system variable cannot get the value, how to use it?

Posted: Wed Sep 03, 2025 3:03 am
by robotask813
{TaskComment}, the value of this system variable is empty, how to use it? Please give an example.

Re: system variable cannot get the value, how to use it?

Posted: Tue Sep 09, 2025 11:56 am
by Oleg
{TaskComment} variable returns the comment/notes of this task
The variable works only in task context. Otherwise it returns the empty value

Look at the task below.
Save the task text to a file and use the Task->Import menu to import the task into RoboTask.
Also you can simply copy task text and paste it into the task list.

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1445264190
Comment=STRINGLIST
ContinueOnError=INTEGER|0
DisableOnError=INTEGER|0
DoNotStopWhenShutdown=INTEGER|0
ExternalName=STRING|"Task1575"
Hide=INTEGER|0
ID=INTEGER|-1045843217
LogOnAsUser=INTEGER|1
Name=STRING|"Show ""{TaskComment}""..."
OnErrorTaskID=INTEGER|0
Priority=INTEGER|3
RestrictRESTAPIAccess=INTEGER|0
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
StepPause=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER

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

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

[\Comment]
s1=Hello world!!!
s2=Just some text in task comment (look at "Notes" tab in task editor)