- 介绍
- 特别声明(Special Announcement)
- 安装目录结构
- 常见问题解答 (FAQ)
- 运行脚本
- 脚本编辑器
- 使用Aut2Exe编译脚本
- AutoIt 窗口信息工具
- 窗口标题与文本(基础篇)
- 窗口标题与文本(高级篇)
- Controls
- Intended Use
- AutoIt v2 用户须知
- 指南 - HelloWorld
- 指南 - 记事本(Notepad)
- 指南 - WinZip
- Language Reference
- Language Reference - Datatypes
- Language Reference - Variables
- Language Reference - Macros
- Language Reference - Operators
- Language Reference - Conditional Statements
- Language Reference - Loops Statements
- Language Reference - User Functions
- Language Reference - Comments
- GUI Reference
- GUI Reference - MessageLoop Mode
- GUI 相关 - OnEvent 模式
- Keywords
- Keyword #comments-start
- Keyword #include
- Keyword #include-once
- Keyword #NoTrayIcon
- Keyword Dim / Global / Local / Const
- Keyword ContinueLoop
- Keyword Do...Until
- Keyword Exit
- Keyword ExitLoop
- Keyword For...Next
- Keyword Func...Return...EndFunc
- Keyword If...Then
- Keyword If...ElseIf...Else...EndIf
- Keyword ReDim
- Keyword Select...Case...EndSelect
- Keyword While...WEnd
- Macros
- 宏列表-AutoIt相关
- Macro Reference - Directory
- Macro Reference - System Info
- Macro Reference - Time And Date
- 函数(Functions)
- 使用函数时的注意事项
- Function ClipGet
- Function ClipPut
- Function EnvGet
- Function EnvSet
- Function EnvUpdate
- Function MemGetStats
- Function DirCopy
- Function DirCreate
- Function DirGetSize
- Function DirMove
- Function DirRemove
- Function DriveGetDrive
- Function DriveGetFileSystem
- Function DriveGetLabel
- Function DriveGetSerial
- Function DriveGetType
- Function DriveMapAdd
- Function DriveMapDel
- Function DriveMapGet
- Function DriveSetLabel
- Function DriveSpaceFree
- Function DriveSpaceTotal
- Function DriveStatus
- Function FileChangeDir
- Function FileClose
- Function FileCopy
- Function FileCreateShortcut
- Function FileDelete
- Function FileExists
- Function FileFindFirstFile
- Function FileFindNextFile
- Function FileGetAttrib
- Function FileGetLongName
- Function FileGetShortcut
- Function FileGetShortName
- Function FileGetSize
- Function FileGetTime
- Function FileGetVersion
- Function FileInstall
- Function FileMove
- Function FileOpen
- Function FileOpenDialog
- Function FileRead
- Function FileReadLine
- Function FileRecycle
- Function FileRecycleEmpty
- Function FileSaveDialog
- Function FileSelectFolder
- Function FileSetAttrib
- Function FileSetTime
- Function FileWrite
- Function FileWriteLine
- Function IniDelete
- Function IniRead
- Function IniReadSection
- Function IniReadSectionNames
- Function IniWrite
- Function AutoItSetOption
- Function PixelChecksum
- Function PixelGetColor
- Function PixelSearch
- Function SoundPlay
- Function SoundSetWaveVolume
- GUI Reference
- Function GUICreate
- Functions
- Function GUICtrlCreateAvi
- Function GUICtrlCreateButton
- Function GUICtrlCreateCheckbox
- Function GUICtrlCreateCombo
- Function GUICtrlCreateContextMenu
- Function GUICtrlCreateDate
- Function GUICtrlCreateDummy
- Function GUICtrlCreateEdit
- Function GUICtrlCreateGroup
- Function GUICtrlCreateIcon
- Function GUICtrlCreateInput
- Function GUICtrlCreateLabel
- Function GUICtrlCreateList
- Function GUICtrlCreateListView
- Function GUICtrlCreateListViewItem
- Function GUICtrlCreateMenu
- Function GUICtrlCreateMenuitem
- Function GUICtrlCreatePic
- Function GUICtrlCreateProgress
- Function GUICtrlCreateRadio
- Function GUICtrlCreateSlider
- Function GUICtrlCreateTab
- Function GUICtrlCreateTabItem
- Function GUICtrlCreateTreeView
- Function GUICtrlCreateTreeViewItem
- Function GUICtrlCreateUpdown
- Function GUICtrlDelete
- Functions
- Function GUICtrlSetBkColor
- Function GUICtrlSetColor
- Function GUICtrlSetCursor
- Function GUICtrlSetData
- Function GUICtrlSetFont
- Function GUICtrlSetImage
- Function GUICtrlSetLimit
- Function GUICtrlSetOnEvent
- Function GUICtrlSetPos
- Function GUICtrlSetResizing
- Function GUICtrlSetState
- Function GUICtrlSetStyle
- Function GUICtrlSetTip
- Functions
- Function GUISetBkColor
- Function GUISetCoord
- Function GUISetCursor
- Function GUISetFont
- Function GUISetHelp
- Function GUISetIcon
- Function GUISetOnEvent
- Function GUISetState
- Function GUIDelete
- Function GUICtrlGetState
- Function GUICtrlRead
- Function GUICtrlRecvMsg
- Function GUICtrlSendMsg
- Function GUICtrlSendToDummy
- Function GUIGetCursorInfo
- Function GUIGetMsg
- Function GUIStartGroup
- Function GUISwitch
- Function HotKeySet
- Function Send
- Function Abs
- Function ACos
- Function ASin
- Function ATan
- Function BitAND
- Function BitNOT
- Function BitOR
- Function BitShift
- Function BitXOR
- Function Cos
- Function Exp
- Function Log
- Function Mod
- Function Random
- Function Round
- Function Sin
- Function Sqrt
- Function Tan
- Function InputBox
- Function MsgBox
- Function ProgressOff
- Function ProgressOn
- Function ProgressSet
- Function SplashImageOn
- Function SplashOff
- Function SplashTextOn
- Function ToolTip
- Function TrayTip
- Function AdlibDisable
- Function AdlibEnable
- Function AutoItSetOption
- Function AutoItWinGetTitle
- Function AutoItWinSetTitle
- Function BlockInput
- Function Break
- Function Call
- Function CDTray
- Function ConsoleWrite
- Function SetError
- Function SetExtended
- Function MouseClick
- Function MouseClickDrag
- Function MouseDown
- Function MouseGetCursor
- Function MouseGetPos
- Function MouseMove
- Function MouseUp
- Function MouseWheel
- Function FtpSetProxy
- Function HttpSetProxy
- Function InetGet
- Function InetGetSize
- Function Ping
- Function DllCall
- Function DllClose
- Function DllOpen
- Function ProcessClose
- Function ProcessExists
- Function ProcessSetPriority
- Function ProcessList
- Function ProcessWait
- Function ProcessWaitClose
- Function Run
- Function RunAsSet
- Function RunWait
- Function Shutdown
- Function RegDelete
- Function RegEnumKey
- Function RegEnumVal
- Function RegRead
- Function RegWrite
- Function StringAddCR
- Function StringInStr
- Function StringIsAlNum
- Function StringIsAlpha
- Function StringIsASCII
- Function StringIsDigit
- Function StringIsFloat
- Function StringFormat
- Function StringIsInt
- Function StringIsLower
- Function StringIsSpace
- Function StringIsUpper
- Function StringIsXDigit
- Function StringLeft
- Function StringLen
- Function StringLower
- Function StringMid
- Function StringReplace
- Function StringRight
- Function StringSplit
- Function StringStripCR
- Function StringStripWS
- Function StringTrimLeft
- Function StringTrimRight
- Function StringUpper
- Function Sleep
- Function TimerInit
- Function TimerDiff
- Function Asc
- Function Chr
- Function Assign
- Function Dec
- Function Eval
- Function Hex
- Function Int
- Function IsAdmin
- Function IsArray
- Function IsDeclared
- Function IsFloat
- Function IsInt
- Function IsNumber
- Function IsString
- Function Number
- Function String
- Function UBound
- Function ControlClick
- Function ControlCommand
- Function ControlDisable
- Function ControlEnable
- Function ControlFocus
- Function ControlGetFocus
- Function ControlGetHandle
- Function ControlGetPos
- Function ControlGetText
- Function ControlHide
- Function ControlListView
- Function ControlMove
- Function ControlSend
- Function ControlSetText
- Function ControlShow
- Function StatusbarGetText
- Function WinActivate
- Function WinActive
- Function WinClose
- Function WinExists
- Function WinGetCaretPos
- Function WinGetClassList
- Function WinGetClientSize
- Function WinGetHandle
- Function WinGetPos
- Function WinGetProcess
- Function WinGetState
- Function WinGetText
- Function WinGetTitle
- Function WinKill
- Function WinList
- Function WinMenuSelectItem
- Function WinMinimizeAll
- Function WinMinimizeAllUndo
- Function WinMove
- Function WinSetOnTop
- Function WinSetState
- Function WinSetTitle
- Function WinSetTrans
- Function WinWait
- Function WinWaitActive
- Function WinWaitClose
- Function WinWaitNotActive
- User Defined Functions
- 自定义函数的注意事项(Function Notes)
- Function _ArrayAdd
- Function _ArrayBinarySearch
- Function _ArrayCreate
- Function _ArrayDelete
- Function _ArrayDisplay
- Function _ArrayInsert
- Function _ArrayMax
- Function _ArrayMaxIndex
- Function _ArrayMin
- Function _ArrayMinIndex
- Function _ArrayPop
- Function _ArrayReverse
- Function _ArraySort
- Function _ArraySwap
- Function _ArrayToClip
- Function _ArrayToString
- Function _ArrayTrim
- Function _ColorGetBlue
- Function _ColorGetGreen
- Function _ColorGetRed
- Function _DateAdd
- Function _DateDayOfWeek
- Function _DateDaysInMonth
- Function _DateDiff
- Function _DateIsLeapYear
- Function _DateIsValid
- Function _DateTimeFormat
- Function _DateToDayValue
- Function _DateToDayOfWeek
- Function _DateToDayValue
- Function _DayValueToDate
- Function _Now
- Function _NowCalc
- Function _NowCalcDate
- Function _NowDate
- Function _NowTime
- Function _TicksToTime
- Function _TimeToTicks
- Function _FileCountLines
- Function _FileCreate
- Function _FileReadToArray
- Function _FileWriteLog
- Function _TempFile
- Function _GetIP
- Function _INetExplorerCapable
- Function _INetMail
- Function _Ceil
- Function _Floor
- Function _MathCheckDiv
- Function _Max
- Function _Min
- Function _Iif
- Function _RunDos
- Function _HexToString
- Function _StringEncrypt
- Function _StringProper
- Function _StringRepeat
- Function _StringReverse
- Function _StringToHex
- Function _viOpen
- Function _viExecCommand
- Function _viFindGpib
- Function _viGpibBusReset
- Function _viGTL
- Function _viOpen
- Function _viSetAttribute
- Function _viSetTimeout
- Language Reference
- ASCII Characters
- CLSID List
- Standard Windows Fonts
- 标准 Windows 字体
- Language Codes
- Send 命令的可用按键列表
文章来源于网络收集而来,版权归原创者所有,如有侵权请及时联系!
AutoIt v2 用户须知
不仅在窗口操作及模拟键击功能上有所不同,AutoIt v3 跟 v2.64 及更旧版本是有很大的区别的,但我们仍提供 v2.64 版本的下载,结果就有些用户尝试转换已有的脚本。但是 v3 具有许多以往版本没有的性能,使得完成GUI自动化操作更加轻松简单,因此它是更好的一般用途的脚本语言。
在您着手入门 v3 之前阅读以下说明将更利于学习。另外要提一下的是,在 AutoIt 安装目录下的“Extra”文件夹里有一个从 v2.64 到 v3 的脚本转换工具。
- 反斜线字符不再是特殊字符,但也许引号却成为新的问题....
例如, Run('C:\Windows\Notepad.exe "C:\Some File.txt" ')
- 命令行语法:
只有脚本模式,比如 AutoIt.exe <脚本文件名>
- 变化:
以往的 <命令>, <参数1> [,<参数2>] 已变成 命令(参数1 [,参数2]) 这种函数形式。
- 随着对循环及自定义函数的支持,Goto 已不再存在。
- AutoItv3 可以支持大多编程语言都有的变量类型,比如 $myVar = "Example of assignment"
- 脚本文件的扩展名从 .aut 变成 .au3。
如果您希望把某个 2.64 版本的脚本改写成 v3 的,下面这个表格应该会对您有用:
2.64 版本的函数 | V3 版本中的替代函数 |
AdlibOn | AdlibEnable |
BlockInput | BlockInput |
Break | Break |
DetectHiddenText | AutoItSetOption("WinDetectHiddenText",...) |
Exit | Exit |
EnvAdd | [见 + 运算符的说明] |
EnvDiv | [见 / 运算符的说明] |
EnvMult | [见 * 运算符的说明] |
EnvSub | [见 - 运算符的说明] |
FileAppend | [FileOpen(...,2) 然后再使用 FileWriteLine] |
FileCopy | FileCopy |
FileCreateDir | DirCreate |
FileDelete | FileDelete or FileRecycle |
FileInstall | FileInstall |
FileReadLine | FileReadLine |
FileRemoveDir | DirRemove |
FileSelectFile | FileOpenDialog or FileSaveDialog |
Gosub | [见 Func...EndFunc] |
Return | [见 Func...EndFunc] |
Goto | [不再需要] |
HideAutoItDebug | -- |
HideAutoItWin | AutoItSetOption("TrayIconHide",...) |
IfInString | If StringInStr(...) Then |
IfNotInString | If Not StringInStr(...) Then |
IfWinExist | If WinExists(...) Then |
IfWinNotExist | If Not WinExists(...) Then |
IfWinActive | If WinActive(...) Then |
IfWinNotActive | If Not WinActive(...) Then |
IfEqual | [见 = 和 == 运算符的说明] |
IfNotEqual | [见 <> 运算符的说明] |
IfGreater | [见 > 运算符的说明] |
IfGreaterOrEqual | [见 >= 运算符的说明] |
IfLess | [见 < 运算符的说明] |
IfLessOrEqual | [见 <= 运算符的说明] |
IfExist | FileExists |
IfNotExist | If Not FileExists(...) Then |
IfMsgBox | [见 MsgBox(...) 和 Select...Case...EndSelect] |
IniRead | IniRead |
IniWrite | IniWrite |
IniDelete | IniDelete |
InputBox | InputBox |
LeftClick | MouseClick("left",...) |
RightClick | MouseClick("right",...) |
LeftClickDrag | MouseClickDrag("left",...) |
RightClickDrag | MouseClickDrag("right",...) |
MouseGetPos | MouseGetPos |
MouseMove | MouseMove |
MsgBox | MsgBox |
Random | Random |
RegRead | RegRead |
RegWrite | RegWrite |
RegDelete | RegDelete |
Repeat | [见 For...Next] |
EndRepeat | [见 For...Next] |
Run | Run |
RunWait | RunWait |
Send | Send |
SetCapslockState | SendSetCapslockState |
SetEnv | EnvSet |
SetBatchLines | -- |
SetKeyDelay | AutoItSetOption("SendKeyDelay",...) |
SetStoreCapslockMode | AutoItSetOption("SendCapslockMode",...) |
SetTitleMatchMode | AutoItSetOption("WinTitleMatchMode",...) |
SetWinDelay | AutoItSetOption("WinWaitDelay",...) |
Shutdown | Shutdown |
Sleep | Sleep |
SplashTextOn | SplashTextOn 和其它 |
SplashTextOff | SplashOff |
StringCaseSense | [见各自的函数说明] |
StringLeft | StringLeft |
StringRight | StringRight |
StringMid | StringMid |
StringLen | StringLen |
StringReplace | StringReplace |
StringTrimLeft | StringTrimLeft |
StringTrimRight | StringTrimRight |
StringGetPos | StringInStr |
WinGetActiveStats | [见 WinGetPos, WinGetTitle, WinGetText] |
WinGetActiveTitle | WinGetTitle("") |
WinKill | WinKill |
WinWait | WinWait |
WinWaitClose | WinWaitClose |
WinWaitActive | WinWaitActive |
WinWaitNotActive | WinWaitNotActive |
WinHide | WinSetState(..., @SW_HIDE) |
WinShow | WinSetState(..., @SW_SHOW) |
WinRestore | WinSetState(...,@SW_RESTORE) |
WinMinimize | WinSetState(...,@SW_MINIMIZE) |
WinMaximize | WinSetState(...,@SW_MAXIMIZE) |
WinActivate | WinActivate |
WinClose | WinClose |
WinMove | WinMove |
WinSetTitle | WinSetTitle |
WinMinimizeAll | WinMinimizeAll |
WinMinimizeAllUndo | WinMinimizeAllUndo |
#Include | #Include |
%CLIPBOARD% | [见 ClipGet 和 ClipPut] |
A_OSTYPE | @OSType |
A_OSVERSION | @OSVersion |
A_SCRIPTNAME | @ScriptName |
A_SCRIPTDIR | @ScriptDir |
A_SCRIPTFULLPATH | @ScriptFullPath |
A_WORKINGDIR | @WorkingDir |
A_NUMBATCHLINES | -- |
A_SEC | @SEC |
A_MIN | @MIN |
A_HOUR | @HOUR |
A_MDAY | @MDAY |
A_MON | @MON |
A_YEAR | @YEAR |
A_WDAY | @WDAY |
A_YDAY | @YDAY |
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论