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/5AutoHotKey Computer Productivity Book 0: AutoHotKey productivity, #0 Rating: 0 out of 5 stars0 ratingsObjective-C Programming Nuts and bolts Rating: 0 out of 5 stars0 ratingsCoding Basics with Microsoft Visual Studio: A Step-by-Step Guide to Microsoft Cloud Services Rating: 0 out of 5 stars0 ratingsAjax in One Hour, For Beginners, Learn Coding Fast Rating: 0 out of 5 stars0 ratingsProgramming Language Concepts: Improving your Software Development Skills Rating: 0 out of 5 stars0 ratingsExcel BI and Dashboards in 7 Days: Build interactive dashboards for powerful data visualization and insights (English Edition) Rating: 0 out of 5 stars0 ratingsBoost.Asio C++ Network Programming Cookbook Rating: 0 out of 5 stars0 ratingsCOBOL Rating: 0 out of 5 stars0 ratingsRaspberry Pi Insider Guide Rating: 0 out of 5 stars0 ratingsRaspberry Pi Server Essentials Rating: 0 out of 5 stars0 ratingsOData Programming Cookbook for .NET Developers Rating: 0 out of 5 stars0 ratingsUSB Complete: The Developer's Guide Rating: 4 out of 5 stars4/5Assembly Programming:Simple, Short, And Straightforward Way Of Learning Assembly Language Rating: 5 out of 5 stars5/5Why AutoHotkey? How Free AutoHotkey Adds Power to Your Windows PC and Provides You Important Brain Food Rating: 5 out of 5 stars5/5AutoHotkey Tricks You Ought To Do With Windows Rating: 5 out of 5 stars5/5JavaScript: Best Practices to Programming Code with JavaScript: JavaScript Computer Programming, #3 Rating: 0 out of 5 stars0 ratingsRaspberry Pi Cookbook for Python Programmers Rating: 0 out of 5 stars0 ratingsSignalR Realtime Application Cookbook Rating: 0 out of 5 stars0 ratingsC Clearly - Programming With C In Linux and On Raspberry Pi Rating: 0 out of 5 stars0 ratingsRaspberry Pi Hardware Projects 1 Rating: 0 out of 5 stars0 ratingsEtherCAT A Complete Guide - 2020 Edition Rating: 0 out of 5 stars0 ratingsLua Game Development Cookbook Rating: 0 out of 5 stars0 ratingsConceptual Programming with Python Rating: 4 out of 5 stars4/5PICAXE Microcontroller Projects For Makers Rating: 0 out of 5 stars0 ratingsProgrammable Logic Controllers: A Practical Approach to IEC 61131-3 using CoDeSys Rating: 0 out of 5 stars0 ratingsNetwork Programming in Python : The Basic: A Detailed Guide to Python 3 Network Programming and Management Rating: 0 out of 5 stars0 ratings
Programming For You
HTML in 30 Pages Rating: 5 out of 5 stars5/5Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5Excel 101: A Beginner's & Intermediate's Guide for Mastering the Quintessence of Microsoft Excel (2010-2019 & 365) in no time! Rating: 0 out of 5 stars0 ratingsExcel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5C Programming For Beginners: The Simple Guide to Learning C Programming Language Fast! 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/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 ratingsLearn PowerShell in a Month of Lunches, Fourth Edition: Covers Windows, Linux, and macOS Rating: 5 out of 5 stars5/5Learn to Code. Get a Job. The Ultimate Guide to Learning and Getting Hired as a Developer. Rating: 5 out of 5 stars5/5SQL All-in-One For Dummies Rating: 3 out of 5 stars3/5C# Programming from Zero to Proficiency (Beginner): C# from Zero to Proficiency, #2 Rating: 0 out of 5 stars0 ratingsHTML & CSS: Learn the Fundaments in 7 Days Rating: 4 out of 5 stars4/5Linux: Learn in 24 Hours Rating: 5 out of 5 stars5/5Spies, Lies, and Algorithms: The History and Future of American Intelligence Rating: 4 out of 5 stars4/5Programming Arduino: Getting Started with Sketches Rating: 4 out of 5 stars4/5Teach Yourself C++ Rating: 4 out of 5 stars4/5Python: Learn Python in 24 Hours Rating: 4 out of 5 stars4/5C# 7.0 All-in-One For Dummies Rating: 0 out of 5 stars0 ratings
Reviews for AutoIT Scripting For Beginners
2 ratings1 review
- Rating: 5 out of 5 stars5/5Great source, im beginner using this to edit and write my own scripts.
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.