Functions()

作者: Titan 最近更新时间: 20100225


A wrapper set of functions for commands which have an output variable.

ControlGet(Cmd, Value = "", Control = "", WinTitle = "", WinText = "", ExcludeTitle = "", ExcludeText = "")
ControlGetFocus(WinTitle = "", WinText = "", ExcludeTitle = "", ExcludeText = "")
ControlGetText(Control = "", WinTitle = "", WinText = "", ExcludeTitle = "", ExcludeText = "")
DriveGet(Cmd, Value = "")
DriveSpaceFree(Path)
EnvGet(EnvVarName)
FileGetAttrib(Filename = "")
FileGetShortcut(LinkFile, ByRef OutTarget = "", ByRef OutDir = "", ByRef OutArgs = "", ByRef OutDescription = "", ByRef OutIcon = "", ByRef OutIconNum = "", ByRef OutRunState = "")
FileGetSize(Filename = "", Units = "")
FileGetTime(Filename = "", WhichTime = "")
FileGetVersion(Filename = "")
FileRead(Filename)
FileReadLine(Filename, LineNum)
FileSelectFile(Options = "", RootDir = "", Prompt = "", Filter = "")
FileSelectFolder(StartingFolder = "", Options = "", Prompt = "")
FormatTime(YYYYMMDDHH24MISS = "", Format = "")
Functions()
GuiControlGet(Subcommand = "", ControlID = "", Param4 = "")
IfBetween(ByRef var, LowerBound, UpperBound)
IfContains(ByRef var, MatchList)
IfIn(ByRef var, MatchList)
IfIs(ByRef var, type)
IfIsNot(ByRef var, type)
IfNotBetween(ByRef var, LowerBound, UpperBound)
IfNotContains(ByRef var, MatchList)
IfNotIn(ByRef var, MatchList)
ImageSearch(ByRef OutputVarX, ByRef OutputVarY, X1, Y1, X2, Y2, ImageFile)
IniRead(Filename, Section, Key, Default = "")
Input(Options = "", EndKeys = "", MatchList = "")
InputBox(Title = "", Prompt = "", HIDE = "", Width = "", Height = "", X = "", Y = "", Font = "", Timeout = "", Default = "")
MouseGetPos(ByRef OutputVarX = "", ByRef OutputVarY = "", ByRef OutputVarWin = "", ByRef OutputVarControl = "", Mode = "")
PixelGetColor(X, Y, RGB = "")
PixelSearch(ByRef OutputVarX, ByRef OutputVarY, X1, Y1, X2, Y2, ColorID, Variation = "", Mode = "")
Random(Min = "", Max = "")
RegRead(RootKey, SubKey, ValueName = "")
Run(Target, WorkingDir = "", Mode = "")
SoundGet(ComponentType = "", ControlType = "", DeviceNumber = "")
SoundGetWaveVolume(DeviceNumber = "")
SplitPath(ByRef InputVar, ByRef OutFileName = "", ByRef OutDir = "", ByRef OutExtension = "", ByRef OutNameNoExt = "", ByRef OutDrive = "")
StatusBarGetText(Part = "", WinTitle = "", WinText = "", ExcludeTitle = "", ExcludeText = "")
StringGetPos(ByRef InputVar, SearchText, Mode = "", Offset = "")
StringLeft(ByRef InputVar, Count)
StringLen(ByRef InputVar)
StringLower(ByRef InputVar, T = "")
StringMid(ByRef InputVar, StartChar, Count , L = "")
StringReplace(ByRef InputVar, SearchText, ReplaceText = "", All = "")
StringRight(ByRef InputVar, Count)
StringTrimLeft(ByRef InputVar, Count)
StringTrimRight(ByRef InputVar, Count)
StringUpper(ByRef InputVar, T = "")
SysGet(Subcommand, Param3 = "")
Transform(Cmd, Value1, Value2 = "")
WinGet(Cmd = "", WinTitle = "", WinText = "", ExcludeTitle = "", ExcludeText = "")
WinGetActiveTitle()
WinGetClass(WinTitle = "", WinText = "", ExcludeTitle = "", ExcludeText = "")
WinGetText(WinTitle = "", WinText = "", ExcludeTitle = "", ExcludeText = "")
WinGetTitle(WinTitle = "", WinText = "", ExcludeTitle = "", ExcludeText = "")

关于函数的参数和返回值, 请参阅其源码.

备注

The function Functions() does only exist for autoinclusion via stdlib mechanism. Itself it does nothing.

关于此函数(集)的更新细节和注意事项, 请参见 AutoHotkey 论坛: http://www.autohotkey.com/forum/viewtopic.php?t=3733

许可

此函数(集)是基于 Simplified BSD 许可的开源项目. 想了解许可详情, 请参见 titan-license.txt

示例

; #Include Functions.ahk
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%

; Call this once, if the library is not explicitly included.
Functions() 

MsgBox % StringReplace(var := "helloworld", "!", "?", True)