oShell = CreateObject("WScript.Shell") lnstart=second() do while not oShell.AppActivate(EXACT WINDOW CAPTION) and ; second()-lnstart <=5 wait wind time 1.0 "Entering Network Password...." if oShell.AppActivate(EXACT WINDOW CAPTION) oShell.SendKeys(EXACT KEYS AS IF USER ENTERS ID AND PASSWORD) ....Search this forum for examples
oCollection = CreateObject("Shell.Application") lnwindows=oCollection.Windows.Count *?oCollection.Windows.Count oIE = CreateObject("InternetExplorer.Application") oIE.Visible = .T. READYSTATE_COMPLETE=4 oIE.Navigate("http://aggressive.live.ptsapp.com/logIn.cfm") do while oIE.Readystate <> READYSTATE_COMPLETE OR oie.busy OR oCollection.Windows.Count#lnwindows+2 * ?oCollection.Windows.Count WAIT WINDOW TIMEOUT 2.0 "" enddo WITH oCollection.Windows(oCollection.Windows.Count-1) DO WHILE .busy WAIT WINDOW TIMEOUT 2.0 "" ENDDO .Document.getElementsByName("username").Item(0).value="username" .Document.getElementsByName("password").Item(0).value="password" * .Document.getElementsByName("button1").Item(0).click ENDWITH oie=null RELEASE oie oCollection=.null. RELEASE oCollection*---------------------------------------------------------------------------------------------------END