home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 February
/
PCWorld_2006-02_cd.bin
/
software
/
vyzkuste
/
triky
/
triky.exe
/
autoit-v3-setup.exe
/
Examples
/
functions.au3
< prev
next >
Wrap
Text File
|
2004-02-28
|
936b
|
44 lines
;
; AutoIt Version: 3.0
; Language: English
; Platform: Win9x/NT
; Author: Jonathan Bennett (jon@hiddensoft.com)
;
; Script Function:
; Demo of using functions
;
; Prompt the user to run the script - use a Yes/No prompt (4 - see help file)
$answer = MsgBox(4, "AutoIt Example", "This script will call a couple of example functions. Run?")
; Check the user's answer to the prompt (see the help file for MsgBox return values)
; If "No" was clicked (7) then exit the script
If $answer = 7 Then
MsgBox(0, "AutoIt", "OK. Bye!")
Exit
EndIf
; Run TestFunc1
TestFunc1()
; Run TestFunc2
TestFunc2(20)
; Finished!
MsgBox(0, "AutoIt Example", "Finished!")
Exit
; TestFunc1
Func TestFunc1()
MsgBox(0, "AutoIt Example", "Inside TestFunc1()")
EndFunc
; TestFunc2
Func TestFunc2($var)
MsgBox(0, "AutoIt Example", "Inside TestFunc2() - $var is: " & $var)
EndFunc