HELP for the RUN PROGRAM

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
kelvintham
Newbie
Posts: 1
Joined: Mon Sep 13, 2010 2:53 am

HELP for the RUN PROGRAM

Post by kelvintham » Mon Sep 13, 2010 4:04 am

Hi there,

i am the newbie here,

i try to macro scheduler on my company software there to open it automatically,

i have try to input the user name and the password to login but the way,

during the login progress, it take some or few sec to updating the company software there (some sort of loading page).

it use the command there to wait for the 10 sec there~ and use the waitwindowopen command.

but do you have any best solution there to detect the window already ready to input there?

Code: Select all

//Run Program
RunProgram>D:\HRMS\myhrms\PEOPLEHR.EXE
//Wait Window Open
Let>WIN_USEHANDLE=0
Let>WF_TYPE=1
WaitWindowOpen>PeopleHR

SetFocus>PeopleHR

//TURN ON CAP
CapsOn
Let>SK_LEGACY=0
Let>SK_DELAY=0

//KEY IN DETAIL OF LOGIN
SendText>master
Press Tab
Let>SK_DELAY=0
Let>SK_IGNORECAPS=0
SendText>abcd1234
Press ENTER
Press ALT
Send>S
Release ALT


//WAIT WINDOWOPEN
WaitWindowOpen>PeopleHR          DEMO DATA
Wait>5.42

//should i wait for so long to login into my interface there?
//EMPLOYEE MODULE
CapsOff
Wait>5.42
Press ALT
Send>me

houhou87
Newbie
Posts: 2
Joined: Mon Sep 13, 2010 1:43 am

Post by houhou87 » Fri Sep 17, 2010 8:10 am

push up for this problem here, my 2nd id here~

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Sep 17, 2010 9:03 am

WaitWindowOpen combined with a Wait is always sensible.

You can also use WaitScreenImage to wait for a visual cue and/or WaitScreenText to wait for text on the screen. Pick something that only appears, or only appears a certain shade/color when the app is ready for input.

You can also try WaitReady which may or may not help in your case. Also try setting RP_WAIT to 2 which again, may or may not be of any help in your case.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

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