Chapter 1. Instant AutoIt Scripting

Welcome to Instant AutoIt Scripting. In this book, you will be surprised to see how easy and funny coding could be. You can automate your digital life from the inner side bolts of your PC. AutoIt v3, which is small and self-contained, is a freeware BASIC-like scripting language, and enhances features found in Visual Basic, VBScript, SendKeys, and others.

You can learn to automate tasks, which would otherwise require to be executed one-by-one by a user. You can automate software applications, web pages within a web browser, the shells of operating systems (OS), and each day's repetitive tasks using tiny, compiled, and standalone programs (1 MB), which do not need installers. You can also run interpreted source code files directly. You can read more about AutoIt on Wikipedia at the following link: http://en.wikipedia.org/wiki/AutoIt.

Installing AutoIt and extras (Simple)

Let us get AutoIt installed, and look at some related scripting tools. AutoIt programs are called scripts. The source files for AutoIt have a .au3 extension.

Getting ready

We need to have the following before we get started:

  • A computer with Windows XP or higher
  • Any kind of Internet connection to download free applications (or downloaded offline files. Only less than 14 Mb zipped files)

How to do it...

Perform the following steps for installing AutoIt:

  1. Visit the following site:

    http://www.autoitscript.com/site/autoit/downloads/

  2. Click on Download AutoIt. Run the installer and keep on clicking the Next buttons. You may choose Edit (recommended) or Run for default running or editing associated source files (.au3).

    You get a new Program Group for AutoIt files installed in C:Program FilesAutoIT3.

  3. Click on Download Editor. Then click on SciTE4AutoIt3.exe. Run the installer and keep on clicking on the Next buttons in the installer dialog. It is a 2-minute straightforward clean installation process.

    Tip

    Choose the same version (64 bit or 32 bit) of AutoIt to match your Windows system. If you want, you can work in a 32-bit AutoIt portable environment with different Microsoft Windows versions (32 bit or 64 bit), no problem. You can even take a backup of AutoIt from the application directory to any storage or Dropbox, and re-use it somewhere else. (Associated file extensions and registry values will not work).

    If asked about Edit or Run, I recommend Edit to be associated with the .au3 extension on double-clicking source files.

    You have to install an upgrade to AutoIt SciTE editor as well as extra tools for AutoIt for a full version editor. Files get installed in C:Program FilesAutoIT3SciTE.

    How to do it...

How it works...

Using Scite Editor you can now edit and create scripts, run them by using the F5 key, or you can even compile it using the F7 key for later use on the same or a different computer. You can use the following SciTE keyboard shortcuts:

  • F1: Help
  • F5: Run (will run Au3Check and AutoIt3)
  • Ctrl + F5: Run Au3Check
  • F7: Compile (will run AU3Check, and then Aut2Exe)

There's more...

The Tools menu is a list of useful extra apps such as Tidy to clean your code, Koda to create forms (GUIs), and AU3Recorder/AutoItMacroGenerator to record macros.

Alternatively, you can also use the following link to learn how to download and install AutoIt:

http://www.youtube.com/watch?v=X2Nc1e1elio

Requirements and how to expand help

AutoIt has been designed to work on Microsoft Windows 2000/XP/2003, Microsoft Windows Vista, Microsoft Windows Server 2008/2008 R2, and Microsoft Windows 7/8, with no runtime libraries required! AutoIt executables and setup programs have been digitally signed by AutoIt Consulting Ltd.

There is a great software community and several friendly forums with support for most languages such as English, German, French, Spanish, Russian, Portuguese, Italian, and so on

You can also refer to the AutoIt documentation online for more help at http://www.autoitscript.com/autoit3/docs/. It gives the same result as pressing F1 in SciTE editor.

Software license

You can refer to the freeware license at http://www.autoitscript.com/autoit3/docs/license.htm.

The following line has been taken from the preceding link provided by the AutoIt author, Jonathan Bennett and the AutoIt team:

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.

You can also refer to the following link:

http://www.autoitscript.com/autoit3/

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset