Hello World

一個簡單的 AutoIt 指令碼,顯示了該語言的一些基本功能。
請注意,分號引入註釋
將其另存為“HelloWorld.au3”

; Include constants.  In this case, for the MsgBox() function
#include <MsgBoxConstants.au3>

; Define and initialize the title of a dialogue box
; All AutoIt variables are loosely typed
; Local specifies the scope
Local $title
$title = "Example Window"

; Alternative method of implicit definition
; This time also indicating constant
Const $text = "Hello World"

; Third example definition
; Strings and integers defined in the same manner
$timeout = 30

; Create dialogue box using #included constants
MsgBox($MB_ICONINFORMATION, $title, $text, $timeout)

; Program end - Use of Exit is not mandatory
Exit

這將產生一個簡單的輸出: -
StackOverflow 文件