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

Discuss RoboTask here
Post Reply
robotask813
Posts: 1
Joined: Wed Sep 03, 2025 2:53 am

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

Post by robotask813 »

{TaskComment}, the value of this system variable is empty, how to use it? Please give an example.
Oleg
Site Admin
Posts: 3231
Joined: Thu Jan 01, 1970 1:00 am
Contact:

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

Post 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)

Oleg Yershov
Post Reply