Tự học AutoIT

1.1K 9.5K 0
Tự học AutoIT

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

v3.3.8.0 ©1999-2011 Jonathan Bennett & AutoIt Team AutoIt v3 Homepage AutoIt Documentation • Introduction • License • Installation Directory • Frequently Asked Questions (FAQ) • Credits • History / ChangeLog • History of AutoIt and Developers Using AutoIt • Running Scripts • AutoIt on Windows Vista • Command Line Parameters • Script Editors • Compiling Scripts • AutoIt Window Info Tool (AU3Info) • Window Titles and Text (Basic) • Window Titles and Text (Advanced) • Controls • Unicode Support • Intended Use • Notes for AutoIt v2 Users • Running under Windows 64-bit Edition Tutorials • My First Script (Hello World) • Simple Notepad Automation • WinZip Installation • String Regular expression Language Reference • Datatypes • Variables • Macros • Operators • Conditional Statements • Loop Statements • Functions • Comments GUI Reference • GUI Concepts • GUI MessageLoop Mode • GUI OnEvent Mode Keyword Reference • Keyword Reference Macro Reference • Macro Reference Function Reference • Function Reference Appendix • AutoIt3 limits/defaults • ASCII Characters • CLSIDs of Special Folders • GUI Control Styles • Splash Fonts • @OSLang Values • Send Key List • Windows Message Codes v3.3.8.0 ©1999-2011 Jonathan Bennett & AutoIt Team AutoIt v3 Homepage Introduction AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting. It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks in a way not possible or reliable with other languages (e.g. VBScript and SendKeys). AutoIt is also very small, self-contained and will run on all versions of Windows out-of-the-box with no annoying "runtimes" required! AutoIt was initially designed for PC "roll out" situations to reliably automate and configure thousands of PCs. Over time it has become a powerful language that supports complex expressions, user functions, loops and everything else that veteran scripters would expect. Features: • Easy to learn BASIC-like syntax • Simulate keystrokes and mouse movements • Manipulate windows and processes • Interact with all standard windows controls • Scripts can be compiled into standalone executables • Create Graphical User Interfaces (GUIs) • COM support • Regular expressions • Directly call external DLL and Windows API functions • Scriptable RunAs functions • Detailed helpfile and large community-based support forums • Compatible with Windows 2000 / XP / 2003 / Vista / 2008 / 7 • Unicode and x64 support • Digitally signed for peace of mind • Works with Windows Vista's User Account Control (UAC) AutoIt has been designed to be as small as possible and stand-alone with no external .dll files or registry entries required making it safe to use on Servers. Scripts can be compiled into stand-alone executables with Aut2Exe. Also supplied is a combined COM and DLL version of AutoIt called AutoItX that allows you to add the unique features of AutoIt to your own favourite scripting or programming languages! Best of all, AutoIt continues to be FREE - but if you want to support the time, money and effort spent on the project and web hosting then you may donate at the AutoIt homepage. Features in Detail Basic-like Syntax and Rich Function Set AutoIt has a BASIC-like syntax which means that most people who have ever written a script or used a high-level language should be able to pick it up easily. Although it started life as a simple automation tool, AutoIt now has functions and features that allow it to be used as a general purpose scripting language (with awesome automation as well of course!). Language features include: • The usual high-level elements for functions, loops and expression parsing • A staggering amount of string handling functions and a Perl compatible regular expression engine (using the PCRE library). • COM support • Call Win32 and third-party DLL APIs Built-in Editor with Syntax Highlighting AutoIt comes with a customised "lite" version of SciTE that makes editing scripts easy. Users can also download a complete version of SciTE that includes additional tools to make things even easier. Standalone and Small AutoIt is a very small and standalone application with no reliance on massive runtimes like .NET or VB. All you need to run AutoIt scripts are the main AutoIt executable (AutoIt3.exe) and the script. Scripts can also be encoded into standalone executables with the built-in script compiler Aut2Exe. International and 64-bit Support AutoIt is fully Unicode aware and also includes x64 versions of all the main components! How many other free scripting languages can you say that about? Key and Mouse Simulation Much time has been spent optimizing the keystroke and mouse simulation functions to be as accurate as possible on all versions of Windows. All the mouse and keyboard routines are highly configurable both in terms of simulation "speed" and functionality. Window Management You can expect to move, hide, show, resize, activate, close and pretty much do what you want with windows. Windows can be referenced by title, text on the window, size, position, class and even internal Win32 API handles. Controls Directly get information on and interact with edit boxes, check boxes, list boxes, combos, buttons, status bars without the risk of keystrokes getting lost. Even work with controls in windows that aren't active! Graphical User Interfaces (GUIs) AutoIt v3 will also allow you to create some complex GUIs - just like those below! And much, much more Software License AutoIt Author : Jonathan Bennett and the AutoIt Team WWW : http://www.autoitscript.com/autoit3/ Email : support at autoitscript dot com ________________________________________________________ END-USER LICENSE AGREEMENT FOR THIS SOFTWARE This End-User License Agreement ("EULA") is a legal agreement between you (either an individual or a single entity) and the mentioned author of this Software for the software product identified above, which includes computer software and may include associated media, printed materials, and "online" or electronic documentation ("SOFTWARE PRODUCT"). By installing, copying, or otherwise using the SOFTWARE PRODUCT, you agree to be bound by the terms of this EULA. If you do not agree to the terms of this EULA, do not install or use the SOFTWARE PRODUCT. SOFTWARE PRODUCT LICENSE The SOFTWARE PRODUCT is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. The SOFTWARE PRODUCT is licensed, not sold. The definition of SOFTWARE PRODUCT does not includes any files generated by the SOFTWARE PRODUCT, such as compiled script files in the form of standalone executables. 1. GRANT OF LICENSE This EULA grants you the following rights: Installation and Use. You may install and use an unlimited number of copies of the SOFTWARE PRODUCT. Reproduction and Distribution. You may reproduce and distribute an unlimited number of copies of the SOFTWARE PRODUCT either in whole or in part; each copy should include all copyright and trademark notices, and shall be accompanied by a copy of this EULA. Copies of the SOFTWARE PRODUCT may be distributed as a standalone product or included with your own product. Commercial Use. You may use the SOFTWARE PRODUCT for commercial purposes. You may sell for profit and freely distribute scripts and/or compiled scripts that were created with the SOFTWARE PRODUCT. Reverse engineering. You may not reverse engineer or disassemble the SOFTWARE PRODUCT or compiled scripts that were created with the SOFTWARE PRODUCT. 2. COPYRIGHT All title and copyrights in and to the SOFTWARE PRODUCT (including but not limited to any images, photographs, animations, video, audio, music, text, and "applets" incorporated into the SOFTWARE PRODUCT), the accompanying printed materials, and any copies of the SOFTWARE PRODUCT are owned by the Author of this Software. The SOFTWARE PRODUCT is protected by copyright laws and international treaty provisions. Therefore, you must treat the SOFTWARE PRODUCT like any other copyrighted material. MISCELLANEOUS If you acquired this product in the United Kingdom, this EULA is governed by the laws of the United Kingdom. If this product was acquired outside the United Kingdom, then local law may apply. Should you have any questions concerning this EULA, or if you desire to contact the author of this Software for any reason, please contact him/her at the email address mentioned at the top of this EULA. LIMITED WARRANTY 1. NO WARRANTIES The Author of this Software expressly disclaims any warranty for the SOFTWARE PRODUCT. The SOFTWARE PRODUCT and any related documentation is provided "as is" without warranty of any kind, either express or implied, including, without limitation, the implied warranties or merchantability, fitness for a particular purpose, or non- infringement. The entire risk arising out of use or performance of the SOFTWARE PRODUCT remains with you. 2. NO LIABILITY FOR DAMAGES In no event shall the author of this Software be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or any other pecuniary loss) arising out of the use of or inability to use this product, even if the Author of this Software has been advised of the possibility of such damages. Because some states/jurisdictions do not allow the exclusion or limitation of liability for consequential or incidental damages, the above limitation may not apply to you. [...]... AutoIt3 _x64.exe The x64 version of AutoIt (if installed) AU3Info.exe The AutoIt Window Info Tool AU3Info_x64.exe The x64 version of Au3Info (if installed) AU3Check.exe The AutoIt syntax checker AutoIt. chm This help file which use AutoIt3 .chm and UDFs3.chm Uninstall.exe The AutoIt uninstaller AutoIt v3 Website.url A shortcut to http://www.autoitscript.com /autoit3 / Aut2Exe Icons\ Contains icons used for the au3 filetype... Structure The AutoIt installer creates a directory structure (usually located in \Program Files \AutoIt3 ) summarized in the following table The installer also creates Start Menu shortcuts, but no other files are added or modified Files and Directories Description (Top-level files) AutoIt3 .exe The AutoIt main program and only file required to run scripts! AutoIt3 _x64.exe The x64 version of AutoIt (if installed)... command line AutoIt specific command Line Switches Form1: AutoIt3 .exe [/ErrorStdOut] [ /AutoIt3 ExecuteScript] file [params ] Execute an AutoIt3 Script File /ErrorStdOut Allows to redirect fatal error to StdOut which can be captured by an application as Scite editor This switch can be used with a compiled script To execute a standard AutoIt Script File 'myscript.au3', use the command: 'AutoIt3 .exe myscript.au3'... Compiled.exe [/ErrorStdOut] [params ] Execute an compiled AutoIt3 Script File produced with Aut2Exe Form3: Compiled.exe [/ErrorStdOut] [ /AutoIt3 ExecuteScript file] [params ] Execute another script file from a compiled AutoIt3 Script File Then you don't need to fileinstall another copy of AutoIT3 .exe in your compiled file Form4: AutoIt3 .exe [/ErrorStdOut] /AutoIt3 ExecuteLine "command line" Execute one line... various third-party AutoIt tools (like syntax checking and script tidying) A "lite" version of the SciTE editor comes with the AutoIt installation package The full AutoIt version of SciTE that comes with all to tools can be downloaded seperately at http://www.autoitscript.com /autoit3 /scite/ Some other recommended editors are: • TextPad • Crimson Editor (free) • Source Edit (free) • UltraEdit AutoIt comes... valid Back To Top Using AutoIt • Running Scripts • AutoIt on Windows Vista • Command Line Parameters • Script Editors • Compiling Scripts • AutoIt Window Info Tool (AU3Info) • Window Titles and Text (Basic) • Window Titles and Text (Advanced) • Controls • Unicode Support • Intended Use • Notes for AutoIt v2 Users • Running under Windows 64-bit Edition Running Scripts When you start AutoIt you will be asked... containing AutoIt keywords and functions that tell AutoIt what you want it to do Script files are created in a simple text editor such as notepad.exe or a much better alternative Although AutoIt v3 scripts are just plain-text files they are usually given the file extension au3 to help tell the difference between a script and a text file If you used the full installer to install AutoIt you can execute an AutoIt. .. a subset of the features of AutoIt via an ActiveX/COM and DLL interface SciTE Contains a light version of SciTE which allows syntax coloring It should be repeated that to run AutoIt scripts, the only required file is AutoIt3 .exe If you compile a script into an executable then a user does not require AutoIt to be installed to run that compiled executable Registry Keys The AutoIt installer creates registry... run that compiled executable Registry Keys The AutoIt installer creates registry keys under HKEY_LOCAL_MACHINE\Software \AutoIt v3 and HKEY_CURRENT_USER\Software \AutoIt v3 The keys are NOT used/created when AutoIt utilities are run on machines that lack a full AutoIt installation AutoIt is "clean" to run on servers, etc The table below shows the default (or typical) registry keys The keys in italic... single line of code, use the command: Run(@AutoItExe & ' /AutoIt3 ExecuteLine "MsgBox(0, ''Hello World!'', ''Hi!'')"') The tray icon will not be displayed when using /AutoIt3 ExecuteLine NOTE: Correct usage of single- and double- quotation marks is important, even double single Form3 and Form4 can be disabled for compiled script when using #NoAutoIt3Execute AutoIt on Windows Vista Windows Vista brings . The AutoIt syntax checker. AutoIt. chm This help file which use AutoIt3 .chm and UDFs3.chm Uninstall.exe The AutoIt uninstaller. AutoIt v3 Website.url A shortcut to http://www.autoitscript.com /autoit3 / Aut2Exe Icons. Description (Top-level files) AutoIt3 .exe The AutoIt main program and only file required to run scripts! AutoIt3 _x64.exe The x64 version of AutoIt (if installed). AU3Info.exe The AutoIt Window Info Tool. AU3Info_x64.exe. and Small AutoIt is a very small and standalone application with no reliance on massive runtimes like .NET or VB. All you need to run AutoIt scripts are the main AutoIt executable (AutoIt3 .exe)

Ngày đăng: 28/04/2014, 15:31

Mục lục

  • AutoIt Documentation

    • Using AutoIt

    • Tutorials

    • Language Reference

    • GUI Reference

    • Keyword Reference

    • Macro Reference

    • Function Reference

    • Appendix

    • Introduction

    • Features in Detail

    • Software License

    • Install Directory Structure

      • Registry Keys

      • Frequently Asked Questions (FAQ)

        • Questions

        • 1. Why doesn't my old AutoIt v2.64 script run in v3?

        • 2. Isn't v3 much more difficult than previous versions?

        • 3. How can I convert my v2.64 scripts to v3?

        • 4. Where is the "goto" command?

        • 5. How can I run a DOS program from within AutoIt?

        • 6. Why can I only use Run() to execute .exe files?  What about .msi / .txt and others?

        • 7. Why do I get errors when I try and use double quotes (") ?

Tài liệu cùng người dùng

Tài liệu liên quan