Variable substitution in Check For Window

Discuss RoboTask here
Post Reply
TimSpeek
Posts: 1
Joined: Fri Dec 29, 2006 7:51 am
Location: Netherlands

Variable substitution in Check For Window

Post by TimSpeek »

Downloaded Robotask today from the free giveaway and tried it out immediately. Got stumped on waiting for the window I wanted to process and found via the forum the "Test Notepad for at least 10 seconds" sample. And being me tried to make it generic. The original  task works fine, but substituting the value Noyepad for a variable does not. What am I doing wrong?
Complete task appended. Looking forward to someone pointing out my mistakes
Tim
;**********************
;* RoboTask Task file *
;* Do not edit!       *
;**********************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|0
CatID=INTEGER|0
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task456"
Hide=INTEGER|0
ID=INTEGER|1476834722
Name=STRING|"Test Generic for at least 10 seconds"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|2
[Actions]
Action1=FOLDER
Action10=FOLDER
Action11=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 variable ""WINDOWTOWAITFOR"" with value ""Notepad"""
Params=FOLDER
[Actions\Action1\Params]
expand=STRING|"0"
varname=STRING|"WINDOWTOWAITFOR"
varvalue=STRING|"Notepad"
[Actions\Action10]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
[Actions\Action11]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""END, {WINDOWTOWAITFOR} Not Found!!!"""
Params=FOLDER
[Actions\Action11\Params]
icon=STRING|"1"
msg0=STRING|"END, {WINDOWTOWAITFOR} Not Found!!!"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"
[Actions\Action2]
ActionID=STRING|"A_LOOP_SIMPLE"
Enabled=INTEGER|-1
Name=STRING|"Simple Loop"
Params=FOLDER
[Actions\Action2\Params]
begin=STRING|"0"
end=STRING|"10"
variable=STRING|"COUNT"
[Actions\Action3]
ActionID=STRING|"A_WINDOW_CHECK"
Enabled=INTEGER|-1
Name=STRING|"Check for Window"
Params=FOLDER
[Actions\Action3\Params]
abortif=STRING|"0"
action=STRING|"1"
checkfor=STRING|"0"
exact=STRING|"0"
variable=STRING|"NOTEPAD_FOUND"
wincaption=STRING|"{WINDOWTOWAITFOR}"
[Actions\Action4]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER
[Actions\Action4\Params]
case=STRING|"0"
operator=STRING|"1"
type=STRING|"3"
value1=STRING|"{NOTEPAD_FOUND}"
value2=STRING|"1"
[Actions\Action5]
ActionID=STRING|"A_GENERAL_PAUSE"
Enabled=INTEGER|-1
Name=STRING|"Delay 1000 ms"
Params=FOLDER
[Actions\Action5\Params]
delay=STRING|"10"
[Actions\Action6]
ActionID=STRING|"A_FLOW_ELSE"
Enabled=INTEGER|-1
Name=STRING|"Else"
[Actions\Action7]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""{WINDOWTOWAITFOR} found"""
Params=FOLDER
[Actions\Action7\Params]
icon=STRING|"1"
msg0=STRING|"{WINDOWTOWAITFOR} found"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"
[Actions\Action8]
ActionID=STRING|"A_LOOP_BREAK"
Enabled=INTEGER|-1
Name=STRING|"Break"
[Actions\Action9]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"
 
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Variable substitution in Check For Window

Post by Oleg »

Hm-m...
Maybe this is a bug, because "Check for window" action ignores variables
Post Reply