AutoIt for uploading and downloading

Source: Internet
Author: User

With a mouse click, the mouse will turn into a small fan-shaped icon. Hold down the left mouse button and drag it to the control you want to Recognize.

The file name input box has the class "Edit" and Instance "1", so the filename is "Edit1".

The Open Button's class is "button" and Instance is "1", so it is saved as "Button1".

open, Write a Script. The Controlfocus () method is used to identify window Windows. The winwait () method sets 10 seconds to wait for the display of the WINDOW. The Controlsettext () method is used to enter the path to the file in the "file name" input box. Sleep (2000) indicates a fixed sleep of 2000 milliseconds. Controlclick () is used to click the Open button in the upload window. AutoIt's script has been written and can be run with the menu bar "Tools"--"Go" (or Press keyboard F5)! Note: the File Upload window should be open at run Time.

Controlfocus ("please Enter file name to save ...", "", "Edit1")

Winwait ("[CLASS: #32770]", "", 10)
Controlsettext ("please Enter file name to save ...", "", "Edit1", "d:\autoit-v3-setup")
Sleep (2000)
Controlclick ("please Enter file name to save ...", "", "Button2");

Open to convert the script to an EXE executable file. Execute EXE DIRECTLY.

try{
Runtime.getruntime (). exec ("d:\\1.exe");
}catch (ioexception E) {
E.printstacktrace ();
}

AutoIt for uploading and downloading

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.