Triggering Events - check windows existl
Posted: Wed Oct 05, 2011 4:46 am
Tell, how it is possible to make in Triggering Events start if there is window exist (or not) or not no such started process (with a full patch to exe file)?
RoboTask discussion forum
https://www.robotask.com/forum/
Code: Select all
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|444444824
Comment=STRINGLIST
ContinueOnError=INTEGER|0
Events=FOLDER
ExternalName=STRING|"Task1089"
Hide=INTEGER|0
ID=INTEGER|742207139
LocalVariables=STRING|"w_exists"
LogOnAsUser=INTEGER|1
Name=STRING|"Check existence of the window"
OnErrorTaskID=INTEGER|0
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|2
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
[Actions\Action1]
ActionID=STRING|"A_WINDOW_CHECK"
Enabled=INTEGER|-1
Name=STRING|"Check for Window"
Params=FOLDER
[Actions\Action1\Params]
abortif=STRING|"0"
action=STRING|"1"
checkfor=STRING|"0"
exact=STRING|"0"
variable=STRING|"w_exists"
wincaption=STRING|"notepad"
[Actions\Action2]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER
[Actions\Action2\Params]
case=STRING|"0"
operator=STRING|"0"
type=STRING|"3"
value1=STRING|"{w_exists}"
[Actions\Action3]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""[{Time}, {DayOfWeek}, {Date}]"""
Params=FOLDER
[Actions\Action3\Params]
icon=STRING|"1"
msg0=STRING|"[{Time}, {DayOfWeek}, {Date}]"
msg1=STRING|"Notepad is working!"
msgcount=STRING|"2"
playsound=STRING|"0"
showmessage=STRING|"1"
[Actions\Action4]
ActionID=STRING|"A_FLOW_ELSE"
Enabled=INTEGER|-1
Name=STRING|"Else"
[Actions\Action5]
ActionID=STRING|"A_ROBOTASK_LOG"
Enabled=INTEGER|-1
Name=STRING|"Log Message"
Params=FOLDER
[Actions\Action5\Params]
message=STRING|"Notepad is not exists"
type=STRING|"3"
[Actions\Action6]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"
[Events]
Event1=FOLDER
[Events\Event1]
Enabled=INTEGER|-1
EventID=STRING|"E_GENERAL_CYCLIC"
Params=FOLDER
UnigueID=INTEGER|699214014
[Events\Event1\Params]
id=STRING|"KJVEQR74"
interval=STRING|"2"