Page 1 of 1

Triggering Events - Expression Monitor

Posted: Thu Jun 06, 2019 6:33 pm
by Sokoban
Hi,

How a task can be started when a global variable is equal to 23, for example?

I`ve been trying with this expression: {VAR} = 23, but unsuccessful.

Re: Triggering Events - Expression Monitor

Posted: Thu Jun 06, 2019 8:13 pm
by Oleg
Expression monitor starts the task when expression changed
Read description of this trigger
This means that any change to the expression causes the task to run.
You can check the expression value in the task.
Look at my example below. Save the text of the task to a file and use menu Task->Import to import the task into RoboTask.
Do not forget to enable the task after importing.

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1040932817
Comment=STRINGLIST
ContinueOnError=INTEGER|0
DoNotStopWhenShutdown=INTEGER|0
Events=FOLDER
ExternalName=STRING|"Task325"
Hide=INTEGER|0
ID=INTEGER|1507890890
LogOnAsUser=INTEGER|1
Name=STRING|"Expression monitor (when MyVar=23)"
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

[Actions\Action1]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER

[Actions\Action1\Params]
case=STRING|"0"
connection=STRING|"0"
count=STRING|"1"
operator=STRING|"0"
type=STRING|"0"
value1=STRING|"{MyVar}"
value2=STRING|"23"

[Actions\Action2]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""[{Time}, {DayOfWeek}, {Date}]"""
Params=FOLDER

[Actions\Action2\Params]
icon=STRING|"1"
msg0=STRING|"[{Time}, {DayOfWeek}, {Date}]"
msg1=STRING|"Hey, awake!"
msgcount=STRING|"2"
playsound=STRING|"0"
showmessage=STRING|"1"

[Actions\Action3]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"

[Events]
Event1=FOLDER

[Events\Event1]
Enabled=INTEGER|-1
EventID=STRING|"E_VARIABLES_MONITOR"
Name=STRING|"Expression Monitor"
Params=FOLDER
UniqueID=INTEGER|-410623771

[Events\Event1\Params]
case=STRING|"0"
id=STRING|"BA9NSBZM"
line00000000=STRING|"{MyVar}"
linecount=STRING|"1"

Re: Triggering Events - Expression Monitor

Posted: Thu Jun 06, 2019 9:21 pm
by Sokoban
Log returns "The task contains UNKNOWNS steps.".

I`m running Lite version 7.0.1.932

Re: Triggering Events - Expression Monitor

Posted: Mon Jun 10, 2019 8:38 pm
by Oleg
Unfortunately loops and flow control are not available in the lite version.