2 " Language: AutoHotkey script file
3 " Maintainer: Nikolai Weibull <now@bitwi.se>
4 " Latest Revision: 2007-05-09
6 if exists("b:current_syntax")
15 syn keyword autohotkeyTodo
19 syn cluster autohotkeyCommentGroup
24 syn match autohotkeyComment
26 \ contains=@autohotkeyCommentGroup
29 syn region autohotkeyComment
30 \ contains=@autohotkeyCommentGroup
31 \ matchgroup=autohotkeyCommentStart
35 syn match autohotkeyEscape
39 syn match autohotkeyHotkey
40 \ contains=autohotkeyKey,
41 \ autohotkeyHotkeyDelimiter
45 syn match autohotkeyKey
50 syn match autohotkeyDelimiter
55 syn match autohotkeyHotstringDefinition
56 \ contains=autohotkeyHotstring,
57 \ autohotkeyHotstringDelimiter
59 \ '^:\%(B0\|C1\|K\d\+\|P\d\+\|S[IPE]\|Z\d\=\|[*?COR]\)*:.\{-}::'
61 syn match autohotkeyHotstring
66 syn match autohotkeyHotstringDelimiter
71 syn match autohotkeyHotstringDelimiter
72 \ contains=autohotkeyHotstringOptions
75 \ ':\%(B0\|C1\|K\d\+\|P\d\+\|S[IPE]\|Z\d\=\|[*?COR]\):'
77 syn match autohotkeyHotstringOptions
80 \ '\%(B0\|C1\|K\d\+\|P\d\+\|S[IPE]\|Z\d\=\|[*?COR]\)'
82 syn region autohotkeyString
85 \ matchgroup=autohotkeyStringDelimiter
88 \ contains=autohotkeyEscape
90 syn region autohotkeyVariable
93 \ contains=autohotkeyBuiltinVariable
94 \ matchgroup=autohotkeyVariableDelimiter
99 syn keyword autohotkeyBuiltinVariable
101 \ A_WorkingDir A_ScriptDir A_ScriptName A_ScriptFullPath A_LineNumber
102 \ A_LineFile A_AhkVersion A_AhkPAth A_IsCompiled A_ExitReason
103 \ A_YYYY A_MM A_DD A_MMMM A_MMM A_DDDD A_DDD A_WDay A_YWeek A_Hour A_Min
104 \ A_Sec A_MSec A_Now A_NowUTC A_TickCount
105 \ A_IsSuspended A_BatchLines A_TitleMatchMode A_TitleMatchModeSpeed
106 \ A_DetectHiddenWindows A_DetectHiddenText A_AutoTrim A_STringCaseSense
107 \ A_FormatInteger A_FormatFloat A_KeyDelay A_WinDelay A_ControlDelay
108 \ A_MouseDelay A_DefaultMouseSpeed A_IconHidden A_IconTip A_IconFile
110 \ A_TimeIdle A_TimeIdlePhysical
111 \ A_Gui A_GuiControl A_GuiWidth A_GuiHeight A_GuiX A_GuiY A_GuiEvent
112 \ A_GuiControlEvent A_EventInfo
113 \ A_ThisMenuItem A_ThisMenu A_ThisMenuItemPos A_ThisHotkey A_PriorHotkey
114 \ A_TimeSinceThisHotkey A_TimeSincePriorHotkey A_EndChar
115 \ ComSpec A_Temp A_OSType A_OSVersion A_Language A_ComputerName A_UserName
116 \ A_WinDir A_ProgramFiles ProgramFiles A_AppData A_AppDataCommon A_Desktop
117 \ A_DesktopCommon A_StartMenu A_StartMenuCommon A_Programs
118 \ A_ProgramsCommon A_Startup A_StartupCommon A_MyDocuments A_IsAdmin
119 \ A_ScreenWidth A_ScreenHeight A_IPAddress1 A_IPAddress2 A_IPAddress3
121 \ A_Cursor A_CaretX A_CaretY Clipboard ClipboardAll ErrorLevel A_LastError
122 \ A_Index A_LoopFileName A_LoopRegName A_LoopReadLine A_LoopField
124 syn match autohotkeyBuiltinVariable
129 syn keyword autohotkeyCommand
130 \ ClipWait EnvGet EnvSet EnvUpdate
131 \ Drive DriveGet DriveSpaceFree FileAppend FileCopy FileCopyDir
132 \ FileCreateDir FileCreateShortcut FileDelete FileGetAttrib
133 \ FileGetShortcut FileGetSize FileGetTime FileGetVersion FileInstall
134 \ FileMove FileMoveDir FileReadLine FileRead FileRecycle FileRecycleEmpty
135 \ FileRemoveDir FileSelectFolder FileSelectFile FileSetAttrib FileSetTime
136 \ IniDelete IniRead IniWrite SetWorkingDir
138 \ Gui GuiControl GuiControlGet IfMsgBox InputBox MsgBox Progress
139 \ SplashImage SplashTextOn SplashTextOff ToolTip TrayTip
140 \ Hotkey ListHotkeys BlockInput ControlSend ControlSendRaw GetKeyState
141 \ KeyHistory KeyWait Input Send SendRaw SendInput SendPlay SendEvent
142 \ SendMode SetKeyDelay SetNumScrollCapsLockState SetStoreCapslockMode
143 \ EnvAdd EnvDiv EnvMult EnvSub Random SetFormat Transform
144 \ AutoTrim BlockInput CoordMode Critical Edit ImageSearch
145 \ ListLines ListVars Menu OutputDebug PixelGetColor PixelSearch
146 \ SetBatchLines SetEnv SetTimer SysGet Thread Transform URLDownloadToFile
147 \ Click ControlClick MouseClick MouseClickDrag MouseGetPos MouseMove
148 \ SetDefaultMouseSpeed SetMouseDelay
149 \ Process Run RunWait RunAs Shutdown Sleep
150 \ RegDelete RegRead RegWrite
151 \ SoundBeep SoundGet SoundGetWaveVolume SoundPlay SoundSet
153 \ FormatTime IfInString IfNotInString Sort StringCaseSense StringGetPos
154 \ StringLeft StringRight StringLower StringUpper StringMid StringReplace
155 \ StringSplit StringTrimLeft StringTrimRight
156 \ Control ControlClick ControlFocus ControlGet ControlGetFocus
157 \ ControlGetPos ControlGetText ControlMove ControlSend ControlSendRaw
158 \ ControlSetText Menu PostMessage SendMessage SetControlDelay
159 \ WinMenuSelectItem GroupActivate GroupAdd GroupClose GroupDeactivate
160 \ DetectHiddenText DetectHiddenWindows SetTitleMatchMode SetWinDelay
161 \ StatusBarGetText StatusBarWait WinActivate WinActivateBottom WinClose
162 \ WinGet WinGetActiveStats WinGetActiveTitle WinGetClass WinGetPos
163 \ WinGetText WinGetTitle WinHide WinKill WinMaximize WinMinimize
164 \ WinMinimizeAll WinMinimizeAllUndo WinMove WinRestore WinSet
165 \ WinSetTitle WinShow WinWait WinWaitActive WinWaitNotActive WinWaitClose
167 syn keyword autohotkeyFunction
168 \ InStr RegExMatch RegExReplace StrLen SubStr Asc Chr
169 \ DllCall VarSetCapacity WinActive WinExist IsLabel OnMessage
170 \ Abs Ceil Exp Floor Log Ln Mod Round Sqrt Sin Cos Tan ASin ACos ATan
171 \ FileExist GetKeyState
173 syn keyword autohotkeyStatement
174 \ Break Continue Exit ExitApp Gosub Goto OnExit Pause Return
177 syn keyword autohotkeyRepeat
180 syn keyword autohotkeyConditional
181 \ IfExist IfNotExist If IfEqual IfLess IfGreater Else
183 syn match autohotkeyPreProcStart
191 syn keyword autohotkeyInclude
196 syn keyword autohotkeyPreProc
198 \ HotkeyInterval HotKeyModifierTimeout
200 \ IfWinActive IfWinNotActive IfWinExist IfWinNotExist
201 \ MaxHotkeysPerInterval MaxThreads MaxThreadsBuffer MaxThreadsPerHotkey
202 \ UseHook InstallKeybdHook InstallMouseHook
204 \ NoTrayIcon SingleInstance
206 \ AllowSameLineComments
215 syn keyword autohotkeyMatchClass
216 \ ahk_group ahk_class ahk_id ahk_pid
218 syn match autohotkeyNumbers
226 syn match autohotkeyInteger
231 syn match autohotkeyInteger
236 syn match autohotkeyFloat
239 \ '\d\+\.\d*\|\.\d\+\>'
241 syn keyword autohotkeyType
245 hi def link autohotkeyTodo Todo
246 hi def link autohotkeyComment Comment
247 hi def link autohotkeyCommentStart autohotkeyComment
248 hi def link autohotkeyEscape Special
249 hi def link autohotkeyHotkey Type
250 hi def link autohotkeyKey Type
251 hi def link autohotkeyDelimiter Delimiter
252 hi def link autohotkeyHotstringDefinition Type
253 hi def link autohotkeyHotstring Type
254 hi def link autohotkeyHotstringDelimiter autohotkeyDelimiter
255 hi def link autohotkeyHotstringOptions Special
256 hi def link autohotkeyString String
257 hi def link autohotkeyStringDelimiter autohotkeyString
258 hi def link autohotkeyVariable Identifier
259 hi def link autohotkeyVariableDelimiter autohotkeyVariable
260 hi def link autohotkeyBuiltinVariable Macro
261 hi def link autohotkeyCommand Keyword
262 hi def link autohotkeyFunction Function
263 hi def link autohotkeyStatement autohotkeyCommand
264 hi def link autohotkeyRepeat Repeat
265 hi def link autohotkeyConditional Conditional
266 hi def link autohotkeyPreProcStart PreProc
267 hi def link autohotkeyInclude Include
268 hi def link autohotkeyPreProc PreProc
269 hi def link autohotkeyMatchClass Typedef
270 hi def link autohotkeyNumber Number
271 hi def link autohotkeyInteger autohotkeyNumber
272 hi def link autohotkeyFloat autohotkeyNumber
273 hi def link autohotkeyType Type
275 let b:current_syntax = "autohotkey"
277 let &cpo = s:cpo_save