Jump to content

Input user ID, password and upload a file through internet explore 7 with no windows popped up


 Share

Recommended Posts

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! :P

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...