Staying Focused

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
B_SHOE
Newbie
Posts: 5
Joined: Thu Oct 06, 2005 9:31 pm

Staying Focused

Post by B_SHOE » Fri Oct 07, 2005 4:41 pm

I have a monster process that I have built in a DTS package on one of our remote servers (we'll call it Server A) here at work. There 6 steps in the process in which I absolutely could not automate without macroscheduler. These processes involve running a program from Server A which is a terminal to a unix based system (we'll call it "U"). The fact that it is unix is irrelevant since I am just sending key strokes to it. Everything works terrific when I watch the process run and in fact I am very impressed with the ease of use with this product...

BUT, this process takes 2.5 to 3 hours and I do not like watching it and obviously need to move onto other things. When I minimize the the remote desktop session to Server A or Server A Locks its desktop, when I run it and come back to it later, it seems to run everything correctly except for the Macro scheduler Executables I built. The Run Program command works, but somehow it seems to loose the focus and not matter how many setfocus commands I do, it will not send the key strokes to "U". Here are some snipets:

Note: The beginning "Wait>5" is so I have time to minimize the remote desktop session for testing.

Wait>5
Run Program>"C:\Program Files\ECIterm\UTerminal.exe" -load TerminalSettings
WaitWindowOpen>UTerminal - TESTware
Wait>2
SetFocus>UTerminal - TESTware
Wait>1
Send Character/Text>USERNAME
Press Enter
Wait>2
Send Character/Text>PASSWORD
Press Enter

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Fri Oct 07, 2005 9:17 pm

Macro Scheduler (and Macro Scheduler EXEs) cannot send keystrokes, mouse events or 'see' windows when the console is locked. When you close the remote desktop the session is locked and windows cease to exist. Macro Scheduler can only work by simulating a user and must therefore have the same level of access. So you cannot expect it to do GUI automation when the session is locked or logged out (as in this state there simply is no GUI). So the answer is not to allow the session to close/lock. See:
http://www.mjtnet.com/index.htm?msfaq17.html
MJT Net Support
[email protected]

B_SHOE
Newbie
Posts: 5
Joined: Thu Oct 06, 2005 9:31 pm

Staying Focused

Post by B_SHOE » Fri Oct 07, 2005 9:32 pm

I have seen this article, but it is interesting that this happens also when I minimize remote desktop even though I am logged in. I really appreciate it. Thank you.

User avatar
JRL
Automation Wizard
Posts: 3517
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Fri Oct 07, 2005 10:03 pm

You can't get macros to run when Remote Desktop is minimized but in my experience they will run fine if the window is reduced in size. Grab the lower left corner and drag its size down to as small as it will let you and the macro will continue running even though you are off working in another window.

Hope this is helpful,
Dick

B_SHOE
Newbie
Posts: 5
Joined: Thu Oct 06, 2005 9:31 pm

Post by B_SHOE » Mon Oct 10, 2005 5:39 pm

This is very helpful. Thank you.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts