There are 3 visual representations:

I'm using Screen Pixel and Local Variables along with Color Compliance to decide which script to run.
It works, but sometimes it's still running the wrong script.

What I'm I doing wrong?
Code: Select all
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|0
CatID=INTEGER|0
Comment=STRINGLIST
ContinueOnError=INTEGER|0
DisableOnError=INTEGER|0
DoNotStopWhenShutdown=INTEGER|0
ExternalName=STRING|"Task16"
Hide=INTEGER|0
ID=INTEGER|1660370954
LogOnAsUser=INTEGER|1
Name=STRING|"05 AutotelexPRO invullen + Eurotax openen tm 2017 vs 2018 vs 2020 (imported)"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
Action10=FOLDER
Action11=FOLDER
Action12=FOLDER
Action13=FOLDER
Action14=FOLDER
Action15=FOLDER
Action16=FOLDER
Action17=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER
Action8=FOLDER
Action9=FOLDER
[Actions\Action1]
ActionID=STRING|"A_SCR_SCRPIXEL"
Enabled=INTEGER|-1
Name=STRING|"Screen Pixel"
Params=FOLDER
[Actions\Action1\Params]
monitor=STRING|"0"
useprimary=STRING|"1"
variable=STRING|"colorWhite"
x=STRING|"1159"
y=STRING|"429"
[Actions\Action10]
ActionID=STRING|"A_LOOP_BREAK"
Enabled=INTEGER|0
Name=STRING|"Break"
[Actions\Action11]
ActionID=STRING|"A_FLOW_ELSEIF"
Enabled=INTEGER|-1
Name=STRING|"ElseIf Then"
Params=FOLDER
[Actions\Action11\Params]
case=STRING|"0"
case#1=STRING|"0"
connection=STRING|"0"
count=STRING|"2"
operator=STRING|"0"
operator#1=STRING|"1"
type=STRING|"3"
type#1=STRING|"3"
value1=STRING|"{ColorMatcheda}"
value1#1=STRING|"{ColorMatchedb}"
[Actions\Action12]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|0
Name=STRING|"Show ""2018 - Point color is white but NOT beige."""
Params=FOLDER
[Actions\Action12\Params]
icon=STRING|"1"
msg0=STRING|"2018 - Point color is white but NOT beige."
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"
[Actions\Action13]
ActionID=STRING|"A_TASKS_START"
Enabled=INTEGER|-1
Name=STRING|"Start Task ""2018 - 05 AutotelexPRO invullen + Eurotax openen!"""
Params=FOLDER
[Actions\Action13\Params]
parametercount=STRING|"0"
required=STRING|"0"
taskid=STRING|"265965612"
wait=STRING|"1"
[Actions\Action14]
ActionID=STRING|"A_FLOW_ELSE"
Enabled=INTEGER|-1
Name=STRING|"Else"
[Actions\Action15]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|0
Name=STRING|"Show ""2020 """
Params=FOLDER
[Actions\Action15\Params]
icon=STRING|"1"
msg0=STRING|"2020 "
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"
[Actions\Action16]
ActionID=STRING|"A_TASKS_START"
Enabled=INTEGER|-1
Name=STRING|"Start Task ""2021 05 AutotelexPRO invullen + Eurotax openen!"""
Params=FOLDER
[Actions\Action16\Params]
parametercount=STRING|"0"
required=STRING|"0"
taskid=STRING|"691894826"
wait=STRING|"1"
[Actions\Action17]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"
[Actions\Action2]
ActionID=STRING|"A_SCR_SCRPIXEL"
Enabled=INTEGER|-1
Name=STRING|"Screen Pixel"
Params=FOLDER
[Actions\Action2\Params]
monitor=STRING|"0"
useprimary=STRING|"1"
variable=STRING|"colorBeige"
x=STRING|"1162"
y=STRING|"446"
[Actions\Action3]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create local variable ""COLORMATCHEDa"" with value ""whiteVariable"""
Params=FOLDER
[Actions\Action3\Params]
expand=STRING|"0"
varkind=STRING|"1"
varname=STRING|"COLORMATCHEDa"
varvalue=STRING|"whiteVariable"
[Actions\Action4]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create local variable ""COLORMATCHEDb"" with value ""beigeVariable"""
Params=FOLDER
[Actions\Action4\Params]
expand=STRING|"0"
varkind=STRING|"1"
varname=STRING|"COLORMATCHEDb"
varvalue=STRING|"beigeVariable"
[Actions\Action5]
ActionID=STRING|"A_SCR_COLORCOMPLIANCE"
Enabled=INTEGER|-1
Name=STRING|"Color Compliance"
Params=FOLDER
[Actions\Action5\Params]
color1=STRING|"{colorWhite}"
color2=STRING|"$00FFFFFF"
tolerance=STRING|"0"
variable=STRING|"ColorMatcheda"
[Actions\Action6]
ActionID=STRING|"A_SCR_COLORCOMPLIANCE"
Enabled=INTEGER|-1
Name=STRING|"Color Compliance"
Params=FOLDER
[Actions\Action6\Params]
color1=STRING|"{colorBeige}"
color2=STRING|"$00EDF1F2"
tolerance=STRING|"0"
variable=STRING|"ColorMatchedb"
[Actions\Action7]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER
[Actions\Action7\Params]
case=STRING|"0"
case#1=STRING|"0"
connection=STRING|"0"
count=STRING|"2"
operator=STRING|"0"
operator#1=STRING|"0"
type=STRING|"3"
type#1=STRING|"3"
value1=STRING|"{ColorMatcheda}"
value1#1=STRING|"{ColorMatchedb}"
[Actions\Action8]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|0
Name=STRING|"Show ""2017 - Point color is white AND beige."""
Params=FOLDER
[Actions\Action8\Params]
icon=STRING|"1"
msg0=STRING|"2017 - Point color is white AND beige."
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"
[Actions\Action9]
ActionID=STRING|"A_TASKS_START"
Enabled=INTEGER|-1
Name=STRING|"Start Task ""05 AutotelexPRO invullen + Eurotax openen!"""
Params=FOLDER
[Actions\Action9\Params]
parametercount=STRING|"0"
required=STRING|"0"
taskid=STRING|"1990679332"
wait=STRING|"1"
