Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Discover millions of ebooks, audiobooks, and so much more with a free trial

From $11.99/month after trial. Cancel anytime.

AutoIT Scripting For Beginners
AutoIT Scripting For Beginners
AutoIT Scripting For Beginners
Ebook313 pages1 hour

AutoIT Scripting For Beginners

Rating: 5 out of 5 stars

5/5

()

Read preview

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

LanguageEnglish
PublisherRajan
Release dateAug 15, 2015
ISBN9781310947209
AutoIT Scripting For Beginners
Author

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

Related to AutoIT Scripting For Beginners

Related ebooks

Programming For You

View More

Related articles

Reviews for AutoIT Scripting For Beginners

Rating: 5 out of 5 stars
5/5

2 ratings1 review

What did you think?

Tap to rate

Review must be at least 10 words

  • Rating: 5 out of 5 stars
    5/5
    Great 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 Anywherebehavior. 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.

Enjoying the preview?
Page 1 of 1