AutoIT Scripting For Beginners
By Rajan
5/5
()
About this ebook
AutoIT is one of the best window application automation tool available in the market as an open source. Using AutoIT you can automate any window application by its simple scripting.
What this book offers...
This book doesn't make any assumptions about your background programming knowledge. You don’t need any prior knowledge to benefit from this book. You will be guided step by step starting form how to install AutoIT, how to record and playback, where to write the script, how to compile the script, how to make it as executable file, how to identify the window object, how to automate any window application using a logical and systematic approach.
Complex concepts are broken down into simple steps to ensure that you can easily master the AutoIT scripting even if you have never coded before.
Examples are carefully chosen to illustrate all concepts. In addition, outputs for all examples are provided immediately so you do not have to wait till you have access to your computer to test the examples.
What you'll learn:
•Introduction to AutoIT
•Record and Play back
•AutoIT V3 Window Info Tool
•Scintilla Editor
•Declaring Variables
•Operators
•Selection statements
•Iteration statements
•Jump statements
•Declaring and calling Functions
•String Functions
•Windows functions
•Calculator Automation
Rajan
Rajan has been working in Corporate firm and has rich knowledge in scripting and automation tools like VBA, selenium and AutoIT. He has keen interest in developing and programming areas. He loves to automate task which is repetitive and time consuming.His hobbies are blogging, writing and reading books. He is passionate in programming languages and develop useful things out of it. He always love to share known information and knowledge with others.
Read more from Rajan
Excel VBA: A Beginners' Guide Rating: 4 out of 5 stars4/5Learn Excel Functions: Logical Functions (IF, AND, OR, NOT) Rating: 3 out of 5 stars3/5Learn Excel Functions: Count, Countif, Sum and Sumif Rating: 5 out of 5 stars5/5Selenium Webdriver: Book1 Rating: 2 out of 5 stars2/5How To Publish My Book In Kindle?: In A Short Span Rating: 0 out of 5 stars0 ratings
Related to AutoIT Scripting For Beginners
Related ebooks
Visual Basic 2010 Coding Briefs Data Access Rating: 5 out of 5 stars5/5Programming Essentials Rating: 5 out of 5 stars5/5Visual Studio Tips and Tricks: I Rating: 0 out of 5 stars0 ratingsAutoHotKey Computer Productivity Book 0: AutoHotKey productivity, #0 Rating: 0 out of 5 stars0 ratingsExcel VBA Programming: Automating Excel through Visual Basic for Application Rating: 0 out of 5 stars0 ratingsBasic Language Rating: 0 out of 5 stars0 ratingsASP.NET For Beginners: The Simple Guide to Learning ASP.NET Web Programming Fast! Rating: 0 out of 5 stars0 ratingsC# for Beginners: Learn in 24 Hours Rating: 0 out of 5 stars0 ratingsPrinciples of Programming: Java Level 1 Rating: 0 out of 5 stars0 ratingsUpdate to Modern C++ Rating: 0 out of 5 stars0 ratingsThe Javascript Adventure Rating: 0 out of 5 stars0 ratingsVisual Studio Code: End-to-End Editing and Debugging Tools for Web Developers Rating: 0 out of 5 stars0 ratingsGuide to Automating Tasks With: AutoHotkey: Basic and Advanced Techniques Rating: 0 out of 5 stars0 ratingsPython Programming for Beginners: A guide to Python computer language, computer programming, and learning Python fast! Rating: 0 out of 5 stars0 ratingsHow To Program A Mobile Game Rating: 4 out of 5 stars4/5Four Programming Languages Creating a Complete Website Scraper Application Rating: 0 out of 5 stars0 ratingsVisual Studio Tips and Trips: II Rating: 0 out of 5 stars0 ratingsProgramming ASP.NET Rating: 0 out of 5 stars0 ratingsVisual Basic 6.0 Programming By Examples: 7 Windows Application Examples Rating: 3 out of 5 stars3/5JavaScript: Best Practices to Programming Code with JavaScript: JavaScript Computer Programming, #3 Rating: 0 out of 5 stars0 ratingsMySQL Management and Administration with Navicat Rating: 0 out of 5 stars0 ratingsBuilding Single-page Web Apps with Meteor Rating: 5 out of 5 stars5/5Programming in Visual Basic (VB): For Visual Studio Rating: 0 out of 5 stars0 ratingsComputer Programming: Made Simple Rating: 5 out of 5 stars5/5Programming Language Concepts: Improving your Software Development Skills Rating: 0 out of 5 stars0 ratingsSQLite Database Programming for Xamarin: Cross-platform C# database development for iOS and Android using SQLite.XM Rating: 0 out of 5 stars0 ratings
Programming For You
HTML & CSS: Learn the Fundaments in 7 Days Rating: 4 out of 5 stars4/5Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5SQL All-in-One For Dummies Rating: 3 out of 5 stars3/5Python: For Beginners A Crash Course Guide To Learn Python in 1 Week Rating: 4 out of 5 stars4/5Learn PowerShell in a Month of Lunches, Fourth Edition: Covers Windows, Linux, and macOS Rating: 0 out of 5 stars0 ratingsSQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5Learn to Code. Get a Job. The Ultimate Guide to Learning and Getting Hired as a Developer. Rating: 5 out of 5 stars5/5Python Programming : How to Code Python Fast In Just 24 Hours With 7 Simple Steps Rating: 4 out of 5 stars4/5SQL: For Beginners: Your Guide To Easily Learn SQL Programming in 7 Days Rating: 5 out of 5 stars5/5Hacking: Ultimate Beginner's Guide for Computer Hacking in 2018 and Beyond: Hacking in 2018, #1 Rating: 4 out of 5 stars4/5Excel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5Python QuickStart Guide: The Simplified Beginner's Guide to Python Programming Using Hands-On Projects and Real-World Applications Rating: 0 out of 5 stars0 ratingsPython Projects for Beginners: A Ten-Week Bootcamp Approach to Python Programming Rating: 0 out of 5 stars0 ratingsModern C++ for Absolute Beginners: A Friendly Introduction to C++ Programming Language and C++11 to C++20 Standards Rating: 0 out of 5 stars0 ratingsProgramming Arduino: Getting Started with Sketches Rating: 4 out of 5 stars4/5Problem Solving in C and Python: Programming Exercises and Solutions, Part 1 Rating: 5 out of 5 stars5/5PYTHON: Practical Python Programming For Beginners & Experts With Hands-on Project Rating: 5 out of 5 stars5/5
Reviews for AutoIT Scripting For Beginners
1 rating0 reviews
Book preview
AutoIT Scripting For Beginners - Rajan
AutoIT scripting for Beginners
By Rajan
© Copyright 2015
All rights reserved. No portion of this book may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher.
Preface
AutoIT is a scripting language well suited to beginners. This book is written to help you learn AutoIT in a simple and easy way. If you are an absolute beginner in programming, you’ll find that this book explain complex concepts and terminology in an easy to understand manner with practical illustrations.
Since AutoIT is one of the best open source tool available in the market, now most of the IT company start using it in QA , networking and maintenance field for automating routine task. So, it will be right time to start learning AutoIT.
Writing this book has been a challenge and a pleasure. I hope that you find the same challenge and pleasure in learning AutoIT.
Contents at a Glance
1) Introduction to AutoIT
2) Record and Play back
3) AutoIT V3 Window Info Tool
4) Scintilla Editor
5) Declaring Variables
6) Operators
7) Selection statements
8) Iteration statements
9) Jump statements
10) Declaring and calling Functions
11) String Functions
12) Windows functions
13) Calculator Automation
What’s Inside
1) Introduction to AutoIT
Why AutoIT?
How AutoIT works?
Download and installation of AutoIT
2) Record and Play back
How to record and play back?
3) AutoIT V3 Window Info Tool
What is the use of identifying properties and objects of windows?
Finder Tool
Basic Window Info
Basic control Info
Window properties
Control properties
Visible Properties
Hidden text
Status bar
Tool bar, mouse and Summary tab
4) Scintilla Editor
How to open new SciTE editor?
Starting a new Script
Syntax check
Compilation
Comments
1) Single line comments
2) Multi line comments
5) Declaring Variables
Naming convention of variable
Variable Declaration
Dim
Global
Local
Constant
Enum
Arrays
Two Dimensional Arrays
6) Operators
Mathematical Operators
Addition Operator (+)
Subtraction Operator (-)
Multiplication Operator (*)
Division Operator (/)
Exponentiation Operator (^)
Assignment Operators
Simple Assignment Operator (=)
Addition Assignment Operator (+=)
Subtraction Assignment Operator (-=)
Multiplication Assignment Operator (*=)
Division Assignment Operator (/*)
Concatenation Operators
Simple Concatenation Operator (&)
Concatenation Assignment Operator (&=)
Comparison Operators
Equivalence Operator
Not Equal to Operator
Greater than operator
Greater than or equal to Operator
Lesser than operator
Lesser than or equal to Operator
Logical Operators
AND Operator
OR Operator
NOT Operator
Order of precedence
7) Selection statements
If..Then statement
If… Else Statement
If...ElseIf...Else...EndIf
Nested If statement
Select case statements
Switch Statement
8) Iteration statements
For..To..Step…Next
For..In..Next
Do…Until
While..Wend
9) Jump statements
ContinueCase
ContinueCase in Select statement
ContinueCase in Switch Statement
Continue Loop
ContinueLoop in Do..Until Loop
ContinueLoop in For..Next Loop
ContineLoop with Level
ExitLoop
Exit Loop in For..Next Loop
Exit Loop with Level
Exit
10) Declaring and calling Functions
Built in functions
Msgbox function
Sleep function
User Defined Functions
11) String Functions
StringLower
StringIsLower
String Upper
StringIsUpper
StringLen
StringIsDigit
StringLeft
StringRight
StringMid
StringInStr
StringReverse
String Replace
12) Windows functions
WinActivate
WinActive
WinClose
WinExists
WinGetClassList
WinGetHandle
WinGetState
WinGetTitle
WinKill
WinMinimizeAll
WinMinimizeAllUndo
WinSetState
WinWait
WinWaitActive
Control Click
13) Calculator Automation
Task To Perform
Pre-Requisite
Properties
Automation script
1) Introduction to AutoIT
AutoIT is an open source automation tool for Windows GUI. It has its own BASIC scripting language for writing scripts, and is typically used in the administration, Quality Assurance, Maintenance, monitoring and system management fields for automating routine tasks. AutoIT can manipulate the simulation of keyboard input, mouse movement and other controls to reliably automate tasks, unlike other programming languages.
Scripts written in AutoIT can be converted into compressed standalone executable files with the help of the Aut2Exe application, so it almost mimics Java’sWrite Once and Run Anywhere
behavior. Once scripts are written and converted into executable files, they can be run on any windows systems that don’t have AutoIT interpreter. This tool comes with a pre-installed SciTe editor for writing the script which has many features including syntax highlighting, syntax folding, auto complete, auto indentation etc.
Why AutoIT?
It is available for free in the market.
Automate all window applications.
Non programmers can easily learn AutoIT script.
Online forums for beginners.
Many inbuilt functions for automation.
It allow user to build own user defined functions.
Compatible with all Window OS
Simulate mouse, keyboard movements.
Sending user inputs to individual controls in an application.
Easy to interact with Component Object Modeling (COM) objects.
Create Stand alone application
Object oriented approach
Easy debugging
QA testing
How AutoIT works?
Users are able to interact with components such as textboxes, radio buttons, check boxes, buttons and many other controls in applications with the help of the keyboard, mouse and human eyes. AutoIT interacts with all of these components by simulating the keyboard and mouse events. Instead of human eyes, AutoIT has its own eye called AutoIT window info tool,
which helps the programmers identify the properties of each control as they interact with it. After identifying the properties and controls of the window, the user has to write the script in Scite Editor. AutoIT converts the script into executable file or au3.
Download and installation of AutoIT
AutoIT is compatible with Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008/2008 R2, Windows 7 and Windows 8. Below are instructions on how to install AutoIT:
Step 1
Navigate to https://www.autoitscript.com/site/autoit/downloads/ and download the most recent version by clicking Download AutoIT.
You can also download AutoIT as a zip package (which doesn’t need installation), but it is recommended that you download the executable file.
Fig 1.1 AutoIT download page
Step 2
Save the downloaded file anywhere in your local drive for installation
Fig1.2 AutoIT set up file
Step 3
Start installing the file and click theNext
button
Fig 1.3 AutoIT installation window 1
Step 4
Click on the I agree
button
Fig 1.4 AutoIT installation window 2
Step 5
Choose the option most convenient to you and click the Next
button.
Run the script-When you click on the script (.au3 file) it will execute the script
Edit the script-When you click on the script (.au3 file) it will open the script for editing.
Fig 1.5 AutoIT installation window 3
Step 6
You can check both of the options for reference and click the Next
button.
Fig 1.6 AutoIT installation window 4
Step 7
Choose the destination folder for AutoIT’s installation and click the Next
button.
Fig 1.7 AutoIT installation window 5
Step 8
Click on the Finish
button to complete the installation.