Task fails, window not found

Discuss RoboTask here
Post Reply
John Long
Posts: 25
Joined: Thu Jul 22, 2004 12:23 pm

Task fails, window not found

Post by John Long »

I am using robotask 3.2.1, I know very old! Its running on a win7 pro 64bit VM, vmware. I log into it remotely and simply close the rdp session.

I have the task setup correctly and when I run it when I am connected to the vm the task runs successfully. If I close the desktop but leave the computer logged in the task fails with Window "My window" not found.

I tried attaching the task file but couldn't, so I pasted it below. :?

Any suggestions?

Thanks,
John

Code: Select all

;*****************************
;* RoboTask Task file         
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|0
ContinueOnError=INTEGER|0
Events=FOLDER
ExternalName=STRING|"Task1"
Hide=INTEGER|0
ID=INTEGER|1605080547
Name=STRING|"Night Utilities"
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

[Actions\Action1]
ActionID=STRING|"A_GENERAL_RUN_PROG"
Enabled=INTEGER|-1
Name=STRING|"Run ""AppliedSystems.Tam.Client.General.NightUtilities.exe """
Params=FOLDER

[Actions\Action1\Params]
program=STRING|"C:\WINTAM\AppliedSystems.Tam.Client.General.NightUtilities.exe"
runas=STRING|"0"
wait=STRING|"1"
workdir=STRING|"C:\WINTAM"

[Actions\Action2]
ActionID=STRING|"A_GENERAL_SENDKEYS"
Enabled=INTEGER|-1
Name=STRING|"Send keys to ""The Agency Manager Signon"""
Params=FOLDER

[Actions\Action2\Params]
currentwindow=STRING|"0"
fixedwindow=STRING|"1"
keylayout=STRING|"0"
keys=STRING|"***{TAB}***{ENTER}"
sendkind=STRING|"0"
wincaption=STRING|"The Agency Manager Signon"

[Actions\Action3]
ActionID=STRING|"A_GENERAL_PAUSE"
Enabled=INTEGER|-1
Name=STRING|"Delay 2000 ms"
Params=FOLDER

[Actions\Action3\Params]
delay=STRING|"20"

[Actions\Action4]
ActionID=STRING|"A_GENERAL_SENDKEYS"
Enabled=INTEGER|-1
Name=STRING|"Send keys to ""Night Utilities Setup"""
Params=FOLDER

[Actions\Action4\Params]
currentwindow=STRING|"0"
fixedwindow=STRING|"1"
keylayout=STRING|"0"
keys=STRING|"r"
sendkind=STRING|"0"
wincaption=STRING|"Night Utilities Setup"

[Actions\Action5]
ActionID=STRING|"A_GENERAL_PAUSE"
Enabled=INTEGER|-1
Name=STRING|"Delay 2000 ms"
Params=FOLDER

[Actions\Action5\Params]
delay=STRING|"20"

[Actions\Action6]
ActionID=STRING|"A_GENERAL_SENDKEYS"
Enabled=INTEGER|-1
Name=STRING|"Send keys to ""Verification"""
Params=FOLDER

[Actions\Action6\Params]
currentwindow=STRING|"0"
fixedwindow=STRING|"1"
keylayout=STRING|"0"
keys=STRING|"{ENTER}"
sendkind=STRING|"0"
wincaption=STRING|"Verification"

[Events]
Event1=FOLDER

[Events\Event1]
Enabled=INTEGER|-1
EventID=STRING|"E_GENERAL_SHEDULER"
Params=FOLDER

[Events\Event1\Params]
id=STRING|"DR9C4KWX"
periodicity=STRING|"0"
startdate=STRING|"41457"
time0=STRING|"7200000"
timecount=STRING|"1"
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Task fails, window not found

Post by Oleg »

You need to put some pause after 1-st step. The value of pause you should determinate experimentally.
You have specified "wait until application ready for input" option.
This option means that process is launched but this doesn't guarantee than main (or necessary) window is already exists. In any case you should put the pause.
Oleg Yershov
John Long
Posts: 25
Joined: Thu Jul 22, 2004 12:23 pm

Re: Task fails, window not found

Post by John Long »

I did that but I'm still having problems when the remote desktop is closed.

I: 7/6/2013 3:42:13 PM: Executing "Run "AppliedSystems.Tam.Client.General.Closeday.exe ""
I: 7/6/2013 3:42:13 PM: Executing "Delay 20000 ms"
I: 7/6/2013 3:42:33 PM: Executing "Send keys to "The Agency Manager Signon""
I: 7/6/2013 3:42:34 PM: Executing "Delay 5000 ms"
I: 7/6/2013 3:42:39 PM: Executing "Send keys to "Close-Day""
E: 7/6/2013 3:42:39 PM: Window "Close-Day" not found
E: 7/6/2013 3:42:39 PM: An error occured. Step #5 (Send keys to "Close-Day").
E: 7/6/2013 3:42:39 PM: Task execution is aborted

When I log back into the vm using remote desktop the signon screen is open but robotask hasn't passed the keys to the sign in screen.
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Task fails, window not found

Post by Oleg »

Unfortunately Send keystroke and mouse actions have no effect in locked sessions.
This is behavior of system. Windows ignores any simulation of keyboard and mouse in locked session.

RoboTask executes 1-st Send keystroke, but this have no effect. So the necessary window doesn't appear and you get an error at next step.
Oleg Yershov
John Long
Posts: 25
Joined: Thu Jul 22, 2004 12:23 pm

Re: Task fails, window not found

Post by John Long »

Can robotask unlock the session?
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Task fails, window not found

Post by Oleg »

Can robotask unlock the session?
Unfortunately no.
If you want to use your task in locked session or in service mode you should avoid interactive actions.
Oleg Yershov
Post Reply