Monitor for colors appearing and use If/then
Posted: Mon Dec 08, 2014 10:18 pm
How can I make it click on a specific area depending if the color red appear on a specific pixel on the window
RoboTask discussion forum
https://www.robotask.com/forum/
Code: Select all
Window pixel
Color Compliance
if result = true then
.....
do something
.....
end if
Code: Select all
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|317955339
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task1111"
Hide=INTEGER|0
ID=INTEGER|1830696294
LogOnAsUser=INTEGER|1
Name=STRING|"Wait for color"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER
Action8=FOLDER
Action9=FOLDER
[Actions\Action1]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create local variable ""COLORMATCHED"" with value ""false"""
Params=FOLDER
[Actions\Action1\Params]
expand=STRING|"0"
varkind=STRING|"1"
varname=STRING|"COLORMATCHED"
varvalue=STRING|"false"
[Actions\Action2]
ActionID=STRING|"A_LOOP_WHILE"
Enabled=INTEGER|-1
Name=STRING|"While loop"
Params=FOLDER
[Actions\Action2\Params]
case=STRING|"0"
operator=STRING|"1"
type=STRING|"3"
value1=STRING|"{ColorMatched}"
[Actions\Action3]
ActionID=STRING|"A_SCR_SCRPIXEL"
Enabled=INTEGER|-1
Name=STRING|"Screen Pixel"
Params=FOLDER
[Actions\Action3\Params]
variable=STRING|"color"
x=STRING|"111"
y=STRING|"171"
[Actions\Action4]
ActionID=STRING|"A_SCR_COLORCOMPLIANCE"
Enabled=INTEGER|-1
Name=STRING|"Color Compliance"
Params=FOLDER
[Actions\Action4\Params]
color1=STRING|"{color}"
color2=STRING|"$00800000"
tolerance=STRING|"16"
variable=STRING|"ColorMatched"
[Actions\Action5]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER
[Actions\Action5\Params]
case=STRING|"0"
operator=STRING|"1"
type=STRING|"3"
value1=STRING|"{ColorMatched}"
[Actions\Action6]
ActionID=STRING|"A_GENERAL_PAUSE"
Enabled=INTEGER|-1
Name=STRING|"Delay 500 ms"
Params=FOLDER
[Actions\Action6\Params]
delay=STRING|"500"
dimension=STRING|"0"
[Actions\Action7]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"
[Actions\Action8]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
[Actions\Action9]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""Point color is Blue!!!!"""
Params=FOLDER
[Actions\Action9\Params]
icon=STRING|"1"
msg0=STRING|"Point color is Blue!!!!"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"