Page 1 of 1
Pause until new window pops up...
Posted: Mon Oct 23, 2006 4:26 am
by wdp01
Is there a way to have RoboTask wait until a specific window pops up before proceeding to additional tasks?
One of the things I'm trying to automate is the connection to a server but this can take between 5 secs and 3 min depending on the useage. I'd hate to have RoboTask just pause for 3 min even if the login window pops up after 5 seconds. Does anyone know of a solution?
Regards,
Wdp01
Pause until new window pops up...
Posted: Mon Oct 23, 2006 6:01 am
by mikronos
hi,I think you can use CheckForWindow for that. There is many way to implement this method. I give you an example.I suppose that the caption of the windows I'm waiting for is 'Notepad'. My example is a loop of ten seconds maximum ( Its important to have a timeout when you wait for a windows) .Each second the presence of 'Notepad' is tested. If I found it I display a message and exit immediately the loop.Hope this can help you.;**********************;* RoboTask Task file *;* Do not edit! *;********************** [Root]ActionAfterRun=INTEGER|0Actions=FOLDERAutomat=INTEGER|0CatID=INTEGER|0ContinueOnError=INTEGER|0Events=FOLDERExternalName=STRING|"Task128"Hide=INTEGER|0ID=INTEGER|1316831924Name=STRING|"Test Notepad for at leat 10 seconds"Priority=INTEGER|3RunOnClose=INTEGER|0RunOnStartup=INTEGER|0ToLog=INTEGER|2[Actions]Action1=FOLDERAction10=FOLDERAction2=FOLDERAction3=FOLDERAction4=FOLDERAction5=FOLDERAction6=FOLDERAction7=FOLDERAction8=FOLDERAction9=FOLDER[Actions\Action1]ActionID=STRING|"A_LOOP_SIMPLE"Enabled=INTEGER|-1Name=STRING|"Simple Loop"Params=FOLDER[Actions\Action1\Params]begin=STRING|"0"end=STRING|"10"variable=STRING|"COUNT"[Actions\Action10]ActionID=STRING|"A_DIALOG_MESSAGE"Enabled=INTEGER|-1Name=STRING|"Show ""END"""Params=FOLDER[Actions\Action10\Params]icon=STRING|"1"msg0=STRING|"END"msgcount=STRING|"1"playsound=STRING|"0"showmessage=STRING|"1"[Actions\Action2]ActionID=STRING|"A_WINDOW_CHECK"Enabled=INTEGER|-1Name=STRING|"Check for Window"Params=FOLDER[Actions\Action2\Params]abortif=STRING|"0"action=STRING|"1"checkfor=STRING|"0"exact=STRING|"0"variable=STRING|"NOTEPAD_FOUND"wincaption=STRING|"Notepad"[Actions\Action3]ActionID=STRING|"A_FLOW_IF"Enabled=INTEGER|-1Name=STRING|"If Then"Params=FOLDER[Actions\Action3\Params]case=STRING|"0"operator=STRING|"1"type=STRING|"3"value1=STRING|"{NOTEPAD_FOUND}"value2=STRING|"1"[Actions\Action4]ActionID=STRING|"A_GENERAL_PAUSE"Enabled=INTEGER|-1Name=STRING|"Delay 1000 ms"Params=FOLDER[Actions\Action4\Params]delay=STRING|"10"[Actions\Action5]ActionID=STRING|"A_FLOW_ELSE"Enabled=INTEGER|-1Name=STRING|"Else"[Actions\Action6]ActionID=STRING|"A_DIALOG_MESSAGE"Enabled=INTEGER|-1Name=STRING|"Show ""Notepad found"""Params=FOLDER[Actions\Action6\Params]icon=STRING|"1"msg0=STRING|"Notepad found"msgcount=STRING|"1"playsound=STRING|"0"showmessage=STRING|"1"[Actions\Action7]ActionID=STRING|"A_LOOP_BREAK"Enabled=INTEGER|-1Name=STRING|"Break"[Actions\Action8]ActionID=STRING|"A_FLOW_ENDIF"Enabled=INTEGER|-1Name=STRING|"End If"[Actions\Action9]ActionID=STRING|"A_LOOP_END"Enabled=INTEGER|-1Name=STRING|"End Loop"[Events]Event1=FOLDER[Events\Event1]Enabled=INTEGER|-1EventID=STRING|"E_WINDOW_WATCHER"Params=FOLDER[Events\Event1\Params]exact=STRING|"0"id=STRING|"UJAEU8ED0"watchfor=STRING|"1"wincaption=STRING|"- Notepad"
Pause until new window pops up...
Posted: Mon Oct 23, 2006 6:15 am
by Oleg
You are right completely . If you are not objecting I've placed your example into our task repository.
Pause until new window pops up...
Posted: Mon Oct 23, 2006 6:25 am
by mikronos
Thanks Oleg OT did you take a look to my problem ? ( the use of basic string function with a variable that contain a quoted string ? )
Pause until new window pops up...
Posted: Mon Oct 23, 2006 6:42 am
by Oleg
Sorry, not yet, I had no time. But I remember about your problem and shall say something within a couple of days.
Pause until new window pops up...
Posted: Mon Oct 23, 2006 12:59 pm
by wdp01
Thanks mikronos!
What you provided was enough for me to figure out how to adapt it to my stuff.
Wdp