HOME

TheInfoList



OR:

AutoIt is a
freeware Freeware is software, often proprietary, that is distributed at no monetary cost to the end user. There is no agreed-upon set of rights, license, or EULA that defines ''freeware'' unambiguously; every publisher defines its own rules for the free ...
programming language A programming language is a system of notation for writing computer programs. Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
for
Microsoft Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
. In its earliest release, it was primarily intended to create
automation Automation describes a wide range of technologies that reduce human intervention in processes, mainly by predetermining decision criteria, subprocess relationships, and related actions, as well as embodying those predeterminations in machine ...
scripts (sometimes called macros) for Microsoft Windows programs but has since grown to include enhancements in both programming language design and overall functionality. The
scripting language In computing, a script is a relatively short and simple set of instructions that typically automation, automate an otherwise manual process. The act of writing a script is called scripting. A scripting language or script language is a programming ...
in AutoIt 1 and 2 was statement-driven and designed primarily for simulating user interaction. From version 3 onward, the AutoIt syntax is similar to that found in the
BASIC Basic or BASIC may refer to: Science and technology * BASIC, a computer programming language * Basic (chemistry), having the properties of a base * Basic access authentication, in HTTP Entertainment * Basic (film), ''Basic'' (film), a 2003 film ...
family of languages. In this form, AutoIt is a general-purpose,
third-generation programming language A third-generation programming language (3GL) is a high-level programming language, high-level computer programming language that tends to be more machine-independent and programmer-friendly than the machine code of the First-generation programmin ...
with a classical data model and a variant data type that can store several types of data, including arrays. An AutoIt automation script can be converted into a compressed, stand-alone executable which can be run on computers even if they do not have the AutoIt interpreter installed. A wide range of function libraries (known as UDFs, or "User Defined Functions") are also included as standard or are available from the website to add specialized functionality. AutoIt is also distributed with an IDE based on the free
SciTE SciTE or SCIntilla based Text Editor is a cross-platform text editor written by Neil Hodgson using the Scintilla editing component. It is licensed under a minimal version of the Historical Permission Notice and Disclaimer. Lightweight and buil ...
editor. The compiler and help text are fully integrated and provide a ''de facto'' standard environment for developers using AutoIt.


History

AutoIt1 and AutoIt2 were closed-source projects, and had a very different syntax than AutoIt3, whose syntax is more like
VBScript VBScript (Microsoft Visual Basic Scripting Edition) is a deprecated programming language for scripting on Microsoft Windows using Component Object Model (COM), based on classic Visual Basic and Active Scripting. It was popular with system admi ...
and BASIC. AutoIt3 was initially
free and open-source Free and open-source software (FOSS) is software available under a Software license, license that grants users the right to use, modify, and distribute the software modified or not to everyone free of charge. FOSS is an inclusive umbrella term ...
, licensed under the terms of the
GNU General Public License The GNU General Public Licenses (GNU GPL or simply GPL) are a series of widely used free software licenses, or ''copyleft'' licenses, that guarantee end users the freedom to run, study, share, or modify the software. The GPL was the first ...
, with its initial public release 3.0.100 in February 2004, and had open-source releases in March 2004 and August 2004. Version 3.0.102, released in August 2004, was initially open-source, but by January 2005 was distributed as closed-source. Subsequent releases, starting from the February 2005 release of version 3.1.0, were all closed-source. Version 3.1.0 was also the first release with support for GUI scripts.


Related projects

The free and open-source
AutoHotkey AutoHotkey is a free and open-source custom scripting language for Microsoft Windows, primarily designed to provide easy keyboard shortcuts or hotkeys, fast macro-creation and software automation to allow users of most computer skill levels to ...
project derived 29 of its functions from the AutoIt 3.1 source code. The AutoHotkey syntax is quite different from AutoIt3 syntax, and rather resembles AutoIt2 syntax.


Features

AutoIt is typically used to produce
utility software Utility software is a program specifically designed to help manage and tune system or application software. It is used to support the computer infrastructure - in contrast to application software, which is aimed at directly performing tasks that b ...
for
Microsoft Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
and to automate routine tasks, such as systems management, monitoring, maintenance, or software installation. It is also used to simulate user interaction, whereby an application is "driven" (via automated form entry, keypresses, mouse clicks, and so on) to do things by an AutoIt script. AutoIt can also be used in low-cost laboratory automation. Applications include instrument synchronization, alarm monitoring and results gathering. Devices such as CNC routers and 3D-printers can also be controlled. * 64-bit code support from version 3.2.10.0 * Add-on libraries and modules for specific apps * Automate sending user input and keystrokes to apps, as well as to individual controls within an app * Call functions in DLL files * Compatible with
User Account Control User Account Control (UAC) is a mandatory access control enforcement feature introduced with Microsoft's Windows Vista and Windows Server 2008 operating systems, with a more relaxed
* Compiling into standalone executables * Create
graphical user interface A graphical user interface, or GUI, is a form of user interface that allows user (computing), users to human–computer interaction, interact with electronic devices through Graphics, graphical icon (computing), icons and visual indicators such ...
s, including message and input boxes * Include data files in the compiled file to be extracted when running * Manipulate windows and processes *
Object-oriented Object-oriented programming (OOP) is a programming paradigm based on the concept of '' objects''. Objects can contain data (called fields, attributes or properties) and have actions they can perform (called procedures or methods and impleme ...
design through a library * Play sounds, pause, resume, stop, seek, get the current position of the sound and get the length of the sound * Run console apps and access the
standard streams In computer programming, standard streams are preconnected input and output communication channels between a computer program and its environment when it begins execution. The three input/output (I/O) connections are called standard input (stdin), ...
* Scripting language with BASIC-like structure for Windows * Simulate
mouse A mouse (: mice) is a small rodent. Characteristically, mice are known to have a pointed snout, small rounded ears, a body-length scaly tail, and a high breeding rate. The best known mouse species is the common house mouse (''Mus musculus'' ...
movements * Supports
component object model Component Object Model (COM) is a binary-interface technology for software components from Microsoft that enables using objects in a language-neutral way between different programming languages, programming contexts, processes and machines ...
(COM) * Supports
regular expressions A regular expression (shortened as regex or regexp), sometimes referred to as rational expression, is a sequence of character (computing), characters that specifies a pattern matching, match pattern in string (computer science), text. Usually ...
* Supports TCP and UDP protocols * Unicode support from version 3.2.4.0


Examples


Hello world

; Make available a library of constant values. #include ; Displays "Hello, world!" in a message box. MsgBox($MB_SYSTEMMODAL, "Title", "Hello, world!")


Automating the Windows Calculator

; Make available a library of constant values. #include ; Display a message box with a timeout of 6 seconds. MsgBox($MB_OK, "Attention", "Avoid touching the keyboard or mouse during automation.", 6) ; Run the Windows Calculator. Run("calc.exe") ; Wait for the calculator to become active with a timeout of 10 seconds. WinWaitActive(" LASS:CalcFrame, "", 10) ; If the calculator did not appear after 10 seconds then exit the script. If WinExists(" LASS:CalcFrame) = 0 Then Exit ; Automatically type the current year into the calculator. Send(@YEAR) ; Let's slow the script down a bit so we can see what's going on. Sleep(600) ; Automatically type in 'divide by 4', and then sleep 600 ms. Send("/4") Sleep(600) ; Hit the return key to display the result, and sleep 600 ms. Send("") Sleep(600) ; Copy the result to the clipboard using the Windows shortcut Ctrl+C. Send("^c") ; Declare, and assign the contents of the clipboard to, a variable. Local $fResult = ClipGet() ; Check to see if the variable contains a decimal point or not. If StringInStr($fResult, ".") Then ; Display a message box with a timeout of 5 seconds. MsgBox($MB_OK, "Leap Year", @YEAR & " is not a leap year.", 5) Else ; This message will only display if the current year is a leap year. MsgBox($MB_OK, "Leap Year", @YEAR & " is a leap year.", 5) EndIf ; Close the Windows calculator - always tidy up afterwards. WinClose(" LASS:CalcFrame)


Find average

; Find Average by JohnOne, modified by czardas #include _Example() ; Run the example. Func _Example() ; Display an input box and ask the user to enter some numbers separated by commas. Local $sInput = InputBox("Find Average", "Enter some numbers separated by commas: 1,2,42,100,3") ; If an error occurred then exit the script. If @error Then Exit ; Populate an array with the user's input. Local $aSplit = StringSplit($sInput, ",") ; Pass the array to the function _Find_Average() and then check for errors. Local $fAverage = _Find_Average($aSplit) If @error Then Exit ; Display the result in a message box. MsgBox($MB_OK, "Find Average", "Result: " & $fAverage) EndFunc ;

>_Example Func _Find_Average($aArray) ; If the input is not of the correct type (an array), then return an error along with the details. If Not IsArray($aArray) Then Return SetError(1, 0, VarGetType($aArray)) ; More detailed checks are possible, but for brevity just one is performed here. ; Declare a variable to store the sum of the numbers. Local $iArraySum = 0 ; Loop through the array. For $i = 1 To $aArray ; Increment the sum by the number in each array element. $iArraySum += Number($aArray i Next ; Return the average rounded to 2 decimal places. Return Round($iArraySum / $aArray 2) EndFunc ;

>_Find_Average


See also

*
AutoHotkey AutoHotkey is a free and open-source custom scripting language for Microsoft Windows, primarily designed to provide easy keyboard shortcuts or hotkeys, fast macro-creation and software automation to allow users of most computer skill levels to ...
* Automator (for Macintosh) * Expect *
iMacros iMacros was a browser-based application for macro recording, editing and playback for web automation and testing. It was provided as a standalone application and extension for Mozilla Firefox, Google Chrome, and Internet Explorer web browsers. D ...
*
Keyboard Maestro Keyboard Maestro is a closed-source commercial macOS-based application that allows automation of routine functions, such as navigating running applications, opening documents, typing text, expanding abbreviations, and controlling web applicatio ...
(for Macintosh) * KiXtart * Macro Express *
Winbatch This is a list of notable programming languages, grouped by type. The groupings are overlapping; not mutually exclusive. A language can be listed in multiple groupings. Agent-oriented programming languages Agent-oriented programming allows ...


References


External links

* {{DEFAULTSORT:Autoit Scripting languages Automation software Proprietary software BASIC programming language family