SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
GUI Automation Macros

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
GUI Automation Macros
Author Message
soumitrabajpai



Joined: 23 Feb 2007
Posts: 8

Post GUI Automation Macros Reply with quote
Hi,

I have created a GUI Automation Macro. This works fine when I am logged in, but suppose I step out and my machine gets locked, or if I schedule if for early morning the macros fail.

I would like the macro to run even if the machine is locked, but I am logged in.

Any suggestions? Is there any job which can auto login and run the macro, or is there something else that I need to do.

Thank you,

Best Regards,

Soumitra
Fri Feb 23, 2007 12:04 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
Well, if the desktop is locked, it is not going to work. Objects to which you send keystrokes and mouse clicks are not visible/active.

What you can do is use the logon utility in the job script to make it unlock your desktop first then you run the MCS macro-script. See http://www.softtreetech.com/24x7/archive/51.htm

In the job script add
Dim( logpid, number)
RunAndWait( "logon.exe -u [user] -p [password]", "", 0, logpid)
MacroPlayBack( .. whatever you have here now
Fri Feb 23, 2007 12:56 pm View user's profile Send private message
soumitrabajpai



Joined: 23 Feb 2007
Posts: 8

Post Reply with quote
Hi,

Thank you. This is good. Now I need to lock the machine after I am done:).

Also, can we check if we are not logged in then only try to login

Best Regards,

Soumitra
Fri Feb 23, 2007 1:21 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
The logon will simply do nothing if the machine is not locked. If you want to ignore any errors reported by that utility, add OnErrorResumeNext in the beginning of the job script.
Fri Feb 23, 2007 2:00 pm View user's profile Send private message
soumitrabajpai



Joined: 23 Feb 2007
Posts: 8

Post Reply with quote
Thanks.

How do I lock the machine after the macro is complete?

I was trying to record a macro for locking the machine, but the recording brakes as soon as I press the keys. So nothing gets recorded

Best Regards,

Soumitra
Fri Feb 23, 2007 2:04 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
After macro completion you will need to run something else to lock the Desktop.
For example you can do add to the end of the job script the following line

RunAndWait("rundll32.exe user32.dll, LockWorkStation", "', 0, lockpid)

Another good tool is shutdown.exe provided by Microsoft since Windows 2000. Read the documentation here: http://support.microsoft.com/?kbid=317371
Fri Feb 23, 2007 2:42 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.