I need help with waitwindowopen

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
speedilad
Newbie
Posts: 10
Joined: Tue Sep 05, 2006 8:56 pm
Contact:

I need help with waitwindowopen

Post by speedilad » Tue Sep 05, 2006 10:09 pm

I have a few scripts that do a "run program" to open a web page. These web pages then require a user name and password entry. I know how to automate the send of the user name and password, but I have problems with the timing. Frequently the user name is not entered into the user name box, but is sent elsewhere - like into the URL address window.

What is the secret to timing the send of text to a window just opened???

Thank you so very much! Jim

code being discussed:
Run Program>C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE "https://investment1s.ameritrade.com/cgi-bin/apps/LogIn"

wait>.2
WaitWindowOpen>Log On to TD AMERITRADE*
WaitReady>0

SetFocus>Log On to TD AMERITRADE*
Wait>0.6
Send Character/Text>username
Press TAB
Send Character/Text>password


I can't see where the username goes, but the password ends up in the URL address box.

Most of the time the script works correctly...

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

Post by JRL » Tue Sep 05, 2006 10:27 pm

Check out the info in this thread.

http://www.mjtnet.com/forum/viewtopic.p ... lorer+busy

Hope this helps,
Dick

User avatar
speedilad
Newbie
Posts: 10
Joined: Tue Sep 05, 2006 8:56 pm
Contact:

Post by speedilad » Tue Sep 05, 2006 11:06 pm

Dick,

looks like that is the answer.

BUT - How do I set Wait to 1???

I tried:
let>wait=1
Sub OpenPage(URL,Wait)
Dim IE
Set IE = CreateObject("InternetExplorer.Application")
IE.visible = 1
IE.navigate URL

do while IE.Busy and Wait
loop
End Sub

I get an error on execution invalid numeric expression in the openpage line...

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Tue Sep 05, 2006 11:28 pm

Forget it, that was confusing.

User avatar
pgriffin
Automation Wizard
Posts: 460
Joined: Wed Apr 06, 2005 5:56 pm
Location: US and Europe

Post by pgriffin » Tue Sep 05, 2006 11:39 pm

You could certainly use the VBScript to perform the wait IEBusy function, however, you could also just add

WaitWindowOpen>your window*
waitready>0
wait>10



then send the text....while you are trying to get the VBScript correct, just build a little more wait time into your script.

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

Post by JRL » Wed Sep 06, 2006 3:13 am

This works for me:

Code: Select all

VBStart
Sub OpenPage(URL,Wait)
  Dim IE
  Set IE = CreateObject("InternetExplorer.Application")
  IE.visible = 1
  IE.navigate URL

  do while IE.Busy and Wait
  loop
End Sub
VBEND

VBRun>OpenPage,http:\\www.mjtnet.com,1

Wait>2
mdl>done
Later,
Dick

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