1 / 16

What is AutoIt ?

What is AutoIt ?. AutoIt is a scripting language The purpose of AutoIt is to automate tasks Only available in Windows Language syntax similar to that of Visual BASIC Provides extensive general scripting to manipulate and manage the Windows GUI.

isi
Download Presentation

What is AutoIt ?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. What is AutoIt? • AutoIt is a scripting language • The purpose of AutoIt is to automate tasks • Only available in Windows • Language syntax similar to that of Visual BASIC • Provides extensive general scripting to manipulate and manage the Windows GUI

  2. Creating , running and compiling a Script in AutoIt • Create a file with the .au3 extension • With AutoIt installed, right click on your file in Windows Explorer, and select Compile or Run • Compiled scripts are standalone .exe applications

  3. Features and Limitations Does not Support • Threads • Instead, use a mechanism called Adlib, which runs periodically but not concurrently • Object oriented design • The Goto keyword • Type checking • Error handling Supports • Arrays • Functions • Conditional Logic • If… Then… Else • Select … Case • Switch … Case • Loops • For...Next • While...WEnd • Do...Until • For...In...Next • Pointers (called Handles) • Static Variables • Extensive String manipulations • Regular Expressions • Extensive GUIcreation/manipulation • COM support • Many libraries of User Defined Functions (UDFs)

  4. Non-Native UDF Libraries

  5. Syntax - Comments • Line comments precede text with a ; • Block comments start with #cs or #comments-start and end with #ce or #comments-end directives

  6. Syntax – Declaring Variables • Variables begin with $, may contain numbers, letters, or underscores _

  7. Syntax – If statement • Conditional Statements and loops may be nested

  8. Syntax – For Loop • Conditional Statements and loops may be nested

  9. Datatypes • Single loosely typed datatype called Variant. • A variant can contain numeric, string or Boolean data and decides how to use the data depending on the situation it is being used in. For example, if you try to: • Multiplytwo variants they will be treated as numbers • Concatenate(join) two variants they will be treated as strings • Logical operations on two variants, they will be treated as Boolean.

  10. Datatypes

  11. Cool native functions of AutoIt • — Simulates a mouse click on a control to a specific x, y. (run->calc) • — Responds to a user pressing a specific key on the keyboard by executing a function (cd tray example) • — Get and put text from/to your clipboard (like ctrl+c and ctrl+c) • This is a clever way to get output and send input to a script

  12. Typical example uses of AutoIt • Automate the task of installing Win-Rar • Creating a bot to play a game that requires certain action on different situations (like Diablo II, Snake, or text based RPG games) • Creating advanced keyboard or mouse macros • Automating specific tasks that would otherwise require manual execution (gcb) • Parse text on the fly using ClipGet (saves you a step of pasting it into another program)

  13. A few example scripts from the AutoIt Forum • WebCamas BarCode Reader- Use your webcam to read barcodes. • Morse Code Generator- Generate morse code by tapping your spacebar! • Weather desktop widget - Standalone updating weather widget for desktop. • Obfuscator – Make your protected scripts harder to read. • Facebook Farmville automation – Script to automate playing Farmville. • 30 Day Trial– A sub-component that may be added to your script to control distribution of your script. • Mouse repel - Keep computer mouse away from an area.

  14. History of AutoIt • AutoIt was created by Jonathan Bennett • Created for the purpose of reliably configuring thousands of new computers in 1999 • AutoIt was rewritten with community support to its current version, v3 • Now includes features such as: • Creating GUIs • Extensive String functions • Many Libraries of User Defined Functions (UDFs)

  15. Here’s a little demonstration. • While I’m preparing the demo of PixelSearch and MouseMove, any questions?

More Related