AutoIt

From Wikipedia, the free encyclopedia - View original article

AutoIt
Autoitlogo.png
Developer(s)Jonathan Bennett & AutoIt Team
Initial releaseJanuary 1999; 15 years ago (1999-01)
Stable release3.3.12.0 / June 1, 2014; 4 months ago (2014-06-01)[1]
Operating systemMicrosoft Windows
TypeGUI Scripting language Automation
LicenseFreeware closed source
Websitewww.autoitscript.com/autoit3/
 
Jump to: navigation, search
AutoIt
Autoitlogo.png
Developer(s)Jonathan Bennett & AutoIt Team
Initial releaseJanuary 1999; 15 years ago (1999-01)
Stable release3.3.12.0 / June 1, 2014; 4 months ago (2014-06-01)[1]
Operating systemMicrosoft Windows
TypeGUI Scripting language Automation
LicenseFreeware closed source
Websitewww.autoitscript.com/autoit3/

AutoIt (pronounced aw-toe-it)[2] is a freeware automation language for Microsoft Windows. In its earliest release, the software was primarily intended to create automation scripts (sometimes called macros) for Microsoft Windows programs[3] but has since grown to include enhancements in both programming language design and overall functionality.

While the scripting language in AutoIt 1 and 2 was statement-driven, designed primarily for simulating user interaction, from version 3 onwards the AutoIt syntax is similar to that found in the BASIC family of languages. In this form, AutoIt is a general-purpose, third-generation programming language with a classical data model and a variant data type that can store several types of data, including arrays. While version 1 and 2 were compatible with Windows 95, 98, ME, NT4, 2000, XP, 2003, Vista and Windows 7, support for operating systems older than Windows 2000 was discontinued with the release of v3.3.0 in December 2008).[4]

An AutoIt automation script can be converted into a compressed, stand-alone executable which can be run on computers that do not have the AutoIt interpreter installed. A wide range of function libraries (known as UDFs, or "User Defined Functions")[5] 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 editor. The compiler and help text are fully integrated and provide a de facto standard environment for developers using AutoIt.

AU3 File Format Icon

Features[edit]

The AutoIt SciTE editor.

Use and misuse[edit]

AutoIt is typically used to produce utility software for Microsoft Windows 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.

As an automation tool, AutoIt can be misused to create computer game bots, for automating in-game tasks, but the AutoIt community will not provide support for such automation. Similarly, AutoIt has been misused to create malware[7] and is often flagged as malware by Anti-Virus utilities due to the internal use of the UPX Packer when compiling scripts into EXE files.

Examples[edit]

Hello world[edit]

 ; Displays "Hello, world!" in a MsgBox and exits. MsgBox( 0, "Title", "Hello, world!" ) Exit 

Find average[edit]

 ;Finds the average of numbers specified by a user. ;The numbers must be delimited by commas. #NoTrayIcon #include <GUIConstantsEx.au3> #include <Array.au3>   #region;-------------------GUI----------------------- $form = GUICreate("Average Finder", 300, 100) $label = GUICtrlCreateLabel("Enter the numbers to be averaged separated by commas", 19, 0) $textbox = GUICtrlCreateInput("", 20, 20, 220) $label1 = GUICtrlCreateLabel("=", 245, 20, 30, 20) $ansLabel = GUICtrlCreateLabel("", 255, 20, 50, 20) $button = GUICtrlCreateButton("Find Average", 100, 40) GUISetState() #endregion;---------------END GUI-----------------------   While 1 	$msg = GUIGetMsg() 	Switch $msg 		Case $GUI_EVENT_CLOSE 			Exit 		Case $button 			$answer = _findAvg(GUICtrlRead($textbox)) 			If $answer Then 				GUICtrlSetData($ansLabel,$answer) 			Else 				GUICtrlSetData($ansLabel,"Error. Malformed input.") 			EndIf 	EndSwitch WEnd   Func _findAvg($nums) 	Local $sData 	Local $ans 	;Clean up input -----------------> 	$chk = StringRight($nums, 5) 	If $chk = "," Then $nums = StringTrimRight($nums, 1) 	If StringInStr($nums, ",") < 1 Then 		Return False 	EndIf 	;----------------------------------> 	$sData = StringSplit($nums, ",") 	$ans = 0 	For $i = 1 To $sData[0] 		$ans += $sData[$i] 	Next 	$ans = $ans / $sData[0] 	Return floor($ans) EndFunc   ;==>_findAvg 

History[edit]

The developers of AutoIt originally released the source code under the GNU General Public License (GPL), but the practice was discontinued beginning with version 3.2.0 in August 2006. Following the terms of the GPL, some of the code from version 3.1 was used to create a fork by the AutoHotkey project,[9] where the community is continuing to develop and release the code under the GPL.

See also[edit]

References[edit]

External links[edit]