liu Posted July 30, 2008 Share Posted July 30, 2008 I have written an AutoIt script doing the following: Open "Run" (Send("#r")) Run iexpolre(send("iexplore"), send("{ENTER}"), the web page required is set as home page) input user ID Input user password click submit - input the filepath of the file needed to be uploaded click upload close the web page It works well in the normal mode, however I need to call it using the wincron, a task scheduling program to run the script at a particular time, and the wincron has be set as a service in user account. Under this mode everything called by the wincron is only run in the black box and cannot interact with the user by displaying a standard Windows Graphical User Interface. So some commands in the AutoIt script seem not work, such as WinWaitActive(),send("{ENTER}"), _IELoadWait ($oIE) ect. that are relative to UI. What I want to ask is: are there any functions that I can use in AutoIt such that I can complete the same task without popping up any windows? Thousands of thanks! Link to comment Share on other sites More sharing options...
junkew Posted July 30, 2008 Share Posted July 30, 2008 Code below gives the direction on how to approach this and demonstrates how to logon. Read and search for IE.AU3 in this forum $objIE = objCreate("InternetExplorer.Application") $objIE.Navigate("<theUrlOfTheHTMLPage>") While $objIE.Busy sleep(1000) wend While $objIE.ReadyState <> 4 sleep(500) wend With $objIE.document.forms("<NameoflogonForm>") .username.Value = "<PutHereYourUsername>" .password.Value = "<PutHereYourPassword>" .submit EndWith sleep(3000) $objIE.Visible = True $objIE = 0 FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now