{
  "displayName": "AutoHotkey",
  "fileTypes": [
    "ahk"
  ],
  "name": "ahk",
  "patterns": [
    {
      "include": "#comment"
    },
    {
      "include": "#string"
    },
    {
      "include": "#script-block"
    },
    {
      "include": "#function"
    },
    {
      "include": "#function-call"
    },
    {
      "include": "#keyword"
    },
    {
      "include": "#punctuation"
    },
    {
      "include": "#text"
    }
  ],
  "repository": {
    "comment": {
      "patterns": [
        {
          "captures": {
            "2": {
              "name": "punctuation.definition.comment.ahk"
            }
          },
          "example": ";comment",
          "match": "(^\\s*|\\s+)(;).*",
          "name": "comment.line.semicolon.ahk"
        },
        {
          "begin": "^\\s*/\\*",
          "end": "^\\s*\\*/",
          "example": "/* comment */",
          "name": "comment.block.slashstar.ahk"
        }
      ]
    },
    "function": {
      "patterns": [
        {
          "captures": {
            "1": {
              "name": "entity.name.function.ahk"
            },
            "2": {
              "name": "punctuation.bracket.parenthesis.ahk"
            },
            "3": {
              "patterns": [
                {
                  "include": "#text"
                }
              ]
            },
            "4": {
              "name": "punctuation.bracket.parenthesis.ahk"
            },
            "5": {
              "name": "punctuation.bracket.curly.ahk"
            },
            "6": {
              "name": "comment.line.semicolon.functionline.ahk"
            }
          },
          "example": "fun(){",
          "match": "(?i:^(\\s*\\w+)(?<!if|while)(\\()(.*)(\\))\\s*(\\{)(\\s+;.*)?$)",
          "name": "functionline.ahk"
        }
      ]
    },
    "function-call": {
      "patterns": [
        {
          "captures": {
            "1": {
              "patterns": [
                {
                  "include": "$self"
                }
              ]
            },
            "2": {
              "name": "comment.line.semicolon.if.ahk"
            }
          },
          "example": "#if [expression]",
          "match": "#\\b(?i:if)\\b(.*?)(\\s+;.*)?$",
          "name": "keyword.control.if.ahk"
        },
        {
          "captures": {
            "1": {
              "name": "string.parameter.import.ahk"
            },
            "2": {
              "name": "comment.line.semicolon.import.ahk"
            }
          },
          "example": "#include",
          "match": "#\\b(?i:include(?:|again))\\b(.*?)(\\s+;.*)?$",
          "name": "keyword.control.import.ahk"
        },
        {
          "captures": {
            "1": {
              "name": "string.parameter.directives.ahk"
            },
            "2": {
              "name": "comment.line.semicolon.directive.ahk"
            }
          },
          "example": "#persistent",
          "match": "#\\b(?i:allowsamelinecomments|clipboardtimeout|commentflag|delimiter|derefchar|errorstdout|escapechar|hotkeyinterval|hotkeymodifiertimeout|hotstring|iftimeout|ifwinactive|ifwinexist|ifwinnotactive|ifwinnotexist|inputlevel|installkeybdhook|installmousehook|keyhistory|ltrim|maxhotkeysperinterval|maxmem|maxthreads|maxthreadsbuffer|maxthreadsperhotkey|menumaskkey|noenv|notrayicon|persistent|requires|singleinstance|usehook|warn|winactivateforce)\\b(.*?)(\\s+;.*)?$",
          "name": "keyword.control.directives.ahk"
        },
        {
          "example": "winkill",
          "match": "\\b(?i:autotrim|blockinput|click|clipwait|control|controlclick|controlfocus|controlget|controlgetfocus|controlgetpos|controlgettext|controlmove|controlsend|controlsendraw|controlsettext|coordmode|detecthiddentext|detecthiddenwindows|drive|driveget|drivespacefree|edit|envadd|envdiv|envget|envmult|envset|envsub|envupdate|fileappend|filecopy|filecopydir|filecreatedir|filecreateshortcut|filedelete|fileencoding|filegetattrib|filegetshortcut|filegetsize|filegettime|filegetversion|fileinstall|filemove|filemovedir|fileread|filereadline|filerecycle|filerecycleempty|fileremovedir|fileselectfile|fileselectfolder|filesetattrib|filesettime|formattime|getkeystate|gosub|goto|groupactivate|groupadd|groupclose|groupdeactivate|gui|guicontrol|guicontrolget|hotkey|ifequal|ifexist|ifgreater|ifgreaterorequal|ifinstring|ifless|iflessorequal|ifmsgbox|ifnotequal|ifnotexist|ifnotinstring|ifwinactive|ifwinexist|ifwinnotactive|ifwinnotexist|imagesearch|inidelete|iniread|iniwrite|input|inputbox|keyhistory|keywait|listhotkeys|listlines|listvars|menu|mouseclick|mouseclickdrag|mousegetpos|mousemove|msgbox|onexit|outputdebug|pause|pixelgetcolor|pixelsearch|postmessage|process|progress|random|regdelete|regread|regwrite|reload|run|runas|runwait|send|sendevent|sendinput|sendlevel|sendmessage|sendmode|sendplay|sendraw|setbatchlines|setcapslockstate|setcontroldelay|setdefaultmousespeed|setenv|setformat|setkeydelay|setmousedelay|setnumlockstate|setscrolllockstate|setstorecapslockmode|setregview|settimer|settitlematchmode|setwindelay|setworkingdir|shutdown|sleep|sort|soundbeep|soundget|soundgetwavevolume|soundplay|soundset|soundsetwavevolume|splashimage|splashtextoff|splashtexton|splitpath|statusbargettext|statusbarwait|stringcasesense|stringgetpos|stringleft|stringlen|stringlower|stringmid|stringreplace|stringright|stringsplit|stringtrimleft|stringtrimright|stringupper|suspend|sysget|thread|tooltip|transform|traytip|urldownloadtofile|winactivate|winactivatebottom|winclose|winget|wingetactivestats|wingetactivetitle|wingetclass|wingetpos|wingettext|wingettitle|winhide|winkill|winmaximize|winmenuselectitem|winminimize|winminimizeall|winminimizeallundo|winmove|winrestore|winset|winsettitle|winshow|winwait|winwaitactive|winwaitclose|winwaitnotactive)\\b",
          "name": "support.function.ahk"
        },
        {
          "example": ".length",
          "match": "\\b(?!MsgBox)(?<=\\.)(?i:length|ateof|encoding|__handle|name|isbuiltin|isvariadic|minparams|maxparams|position|pos)(?![(.\\[])\\b",
          "name": "support.function.ahk"
        },
        {
          "example": "A_ScriptDir",
          "match": "\\b(?!MsgBox)(?i:a_ahkpath|a_args|a_listlines|a_sendmode|a_sendlevel|a_storecapslockmode|a_coordmodetooltip|a_coordmodepixel|a_coordmodemouse|a_coordmodecaret|a_coordmodemenu|a_timeidlekeyboard|a_timeidlemouse|a_defaultgui|a_defaultlistview|a_defaulttreeview|a_comspec|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_clipboard|a_computername|a_controldelay|a_cursor|a_ddd??|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_fileencoding|a_formatfloat|a_formatinteger|a_gui|a_guievent|a_guicontrol|a_guicontrolevent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_initialworkingdir|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_is64bitos|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_isunicode|a_keydelayplay|a_keydelay|a_keydurationplay|a_keyduration|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfilepath|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mmm??|a_mmmm|a_mon|a_mousedelayplay|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|a_priorkey|a_programfiles|a_programs|a_programscommon|a_ptrsize|a_regview|a_screendpi|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scripthwnd|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel|programfiles|true|false)\\b",
          "name": "constant.language.ahk"
        }
      ]
    },
    "keyword": {
      "patterns": [
        {
          "example": "this",
          "match": "\\b(?!MsgBox)(?i:this)\\b",
          "name": "support.class.ahk"
        },
        {
          "example": "LButton",
          "match": "\\b(?!MsgBox)(?i:new|__New|__Delete|__Set|__Get|__Call|shift|lshift|rshift|alt|lalt|ralt|control|lcontrol|rcontrol|ctrl|lctrl|rctrl|lwin|rwin|appskey|altdown|altup|shiftdown|shiftup|ctrldown|ctrlup|lwindown|lwinup|rwindown|rwinup|lbutton|rbutton|mbutton|wheelup|wheelleft|wheelright|wheeldown|xbutton1|xbutton2|joy1|joy2|joy3|joy4|joy5|joy6|joy7|joy8|joy9|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy30|joy31|joy32|joyx|joyy|joyz|joyr|joyu|joyv|joypov|joyname|joybuttons|joyaxes|joyinfo|space|tab|enter|escape|esc|backspace|bs|delete|del|insert|ins|pgup|pgdn|home|end|up|down|left|right|printscreen|ctrlbreak|pause|scrolllock|capslock|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadmult|numpadadd|numpadsub|numpaddiv|numpaddot|numpaddel|numpadins|numpadclear|numpadup|numpaddown|numpadleft|numpadright|numpadhome|numpadend|numpadpgup|numpadpgdn|numpadenter|f1|f2|f3|f4|f5|f6|f7|f8|f9|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f20|f21|f22|f23|f24|browser_back|browser_forward|browser_refresh|browser_stop|browser_search|browser_favorites|browser_home|volume_mute|volume_down|volume_up|media_next|media_prev|media_stop|media_play_pause|launch_mail|launch_media|launch_app1|launch_app2|vk\\d+|sc\\d+)\\b(?!\\s*\\()\\b",
          "name": "keyword.keys.ahk"
        },
        {
          "example": "text",
          "match": "\\b(?!MsgBox)(?<!\\.)(?i:ahk_id|ahk_exe|ahk_pid|ahk_class|ahk_group|not|or|and|static|global|local|byref|error|single|GuiEscape|GuiClose|GuiSize|GuiContextMenu|GuiDropFiles|buttons|lines|blind|raw|all|base)(?![(.\\[])\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=::\\s*)(AltTab|ShiftAltTab|AltTabMenu|AltTabAndMenu|AltTabMenuDismiss)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\b(AutoTrim|DetectHiddenText|DetectHiddenWindows|ListLines|SetStoreCapsLockMode)\\b\\s*,?\\s*)(O(?:n|ff))\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bBlockInput\\b\\s*,?\\s*)(On|Off|Send|Mouse|SendAndMouse|Default|MouseMove|MouseMoveOff)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bControl\\b\\s*,?\\s*)(Check|Uncheck|Enable|Disable|Show|Hide|Style|ExStyle|ShowDropDown|HideDropDown|TabLeft|TabRight|Add|Delete|Choose|ChooseString|EditPaste)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bControlClick\\b\\s*,?[^,]*,[^,]+,[^,]*,\\s*)(L|Left|R|Right|M|Middle|X1|XButton1|X2|XButton2|WheelUp|WU|WheelDown|WD|WheelLeft|WL|WheelRight|WR)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bControlClick\\b\\s*,?[^,]*,[^,]+,[^,]*,[^,]*,[^,]*,[^,]*)(NA|[DU]|Pos)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bCoordMode\\b\\s*,?\\s*)(ToolTip|Pixel|Mouse|Caret|Menu)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bCoordMode\\b\\s*,?[^,]+,\\s*)(Screen|Relative|Window|Client)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bDrive\\b\\s*,?\\s*)(Label|Lock|Unlock|Eject)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bDriveGet\\b\\s*,?[^,]+,\\s*)(List|Capacity|FS|FileSystem|Label|Serial|Type|Status|StatusCD)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bDriveGet\\b\\s*,?[^,]+,\\s*List\\s*,\\s*)(CDROM|REMOVABLE|FIXED|NETWORK|RAMDISK|UNKNOWN)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\b(Env(?:Add|Sub))\\b\\s*,?[^,]+,[^,]+,\\s*)(Seconds|Minutes|Hours|Days|[DHMS])\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=([-+])=[^,]+,\\s*)(Seconds|Minutes|Hours|Days|[DHMS])\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bFileEncoding\\b\\s*,?\\s*)(UTF-8|UTF-8-RAW|UTF-16|UTF-16-RAW|CP\\d{3,5})\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bFor\\s+(\\w+|%\\w+%)\\s*(,\\s*(\\w+|%\\w+%))?\\s+)(in)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bFormatTime\\b\\s*,?[^,]+,[^,]*,\\s*)(Time|ShortDate|LongDate|YearMonth|YDay0??|WDay|YWeek)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGetKeyState\\b\\s*,?[^,]+,[^,]+,\\s*)([PT])\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?)(New|Add|Show|Submit|Cancel|Hide|Destroy|Font|Color|Margin|Menu|Minimize|Maximize|Restore|Flash|Default|ListView)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?Add\\s*,\\s*)(Text|Edit|UpDown|Picture|Pic|Button|Checkbox|Radio|DropDownList|DDL|ComboBox|ListBox|ListView|TreeView|Link|Hotkey|DateTime|MonthCal|Slider|Progress|GroupBox|Tab2??|Tab3|StatusBar|ActiveX|Custom)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?Show\\s*,[^,]*)(Center|xCenter|yCenter|AutoSize|Minimize|Maximize|Restore|NoActivate|NA|Hide)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?Submit\\s*,\\s*)NoHide\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?Font\\s*,[^,]*)(Bold|Italic|Strike|Underline|Norm|c(Default|Black|Silver|Gray|White|Maroon|Red|Purple|Fuchsia|Green|Lime|Olive|Yellow|Navy|Blue|Teal|Aqua))\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?Color\\s*,\\s*)(Default|Black|Silver|Gray|White|Maroon|Red|Purple|Fuchsia|Green|Lime|Olive|Yellow|Navy|Blue|Teal|Aqua)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?Flash\\s*,\\s*)Off\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*(((\\w+|%\\w+%):\\s*)?New\\s*,)?[^,]*)(AlwaysOnTop|Border|Caption|Delimiter|Disabled|DPIScale|Hwnd|Label|LastFound|LastFoundExist|MaximizeBox|MinimizeBox|MinSize|MaxSize|OwnDialogs|Owner|Parent|Resize|SysMenu|Theme|ToolWindow)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?Add\\s*,\\s*(\\w+|%\\w+%)\\s*,[^,]*)(wp|hp|xp|yp|xm|ym|xs|ys)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?Add\\s*,\\s*(\\w+|%\\w+%)\\s*,[^,]*)(AltSubmit|Choose|Disabled|Hidden|Left|Right|Center|Section|Tabstop|Wrap|VScroll|HScroll|Controls|BackgroundTrans|Background|Border|HwndOutputVar|Theme|c(Default|Black|Silver|Gray|White|Maroon|Red|Purple|Fuchsia|Green|Lime|Olive|Yellow|Navy|Blue|Teal|Aqua))\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?Add\\s*,\\s*Edit\\s*,[^,]*)(Limit|Lowercase|Multi|Number|Password|ReadOnly|Uppercase|WantCtrlA|WantReturn|WantTab|Wrap)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?Add\\s*,\\s*UpDown\\s*,[^,]*)(Horz|Left|Range|Wrap|16|0x80)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?Add\\s*,\\s*(Pic(?:ture|))\\s*,[^,]*)(Icon\\d+)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?Add\\s*,\\s*Button\\s*,[^,]*)(Default)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?Add\\s*,\\s*CheckBox\\s*,[^,]*)(Check(?:3|ed|edGray))\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?Add\\s*,\\s*Radio\\s*,[^,]*)(Group|Checked)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?Add\\s*,\\s*(D(?:ropDownList|DL))\\s*,[^,]*)(Choose|Uppercase|Lowercase|Sort)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?Add\\s*,\\s*ComboBox\\s*,[^,]*)(Limit|Simple)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?Add\\s*,\\s*ListBox\\s*,[^,]*)(Choose|Multi|ReadOnly|Sort|0x100)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?Add\\s*,\\s*DateTime\\s*,[^,]*,[^,]*)(LongDate|Time|Choose|ChooseNone|Range|Right)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?Add\\s*,\\s*MonthCal\\s*,[^,]*)(Multi|Range|Colors|[48]|16)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?Add\\s*,\\s*Slider\\s*,[^,]*)(Buddy1|Buddy2|Center|Invert|Left|Line|NoTicks|Page|Range|Thick|TickInterval|ToolTip|Vertical)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?Add\\s*,\\s*Progress\\s*,[^,]*)(Background|Range|Smooth|Vertical|c(Default|Black|Silver|Gray|White|Maroon|Red|Purple|Fuchsia|Green|Lime|Olive|Yellow|Navy|Blue|Teal|Aqua)|Background(Default|Black|Silver|Gray|White|Maroon|Red|Purple|Fuchsia|Green|Lime|Olive|Yellow|Navy|Blue|Teal|Aqua))\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?Add\\s*,\\s*(Tab[23]??)\\s*,[^,]*)(Choose|Background|Buttons|Left|Right|Bottom|Wrap)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?Add\\s*,\\s*ListView\\s*,[^,]*)(AltSubmit|Background|Checked|Count|Grid|Hdr|LV|LV0x10|LV0x20|Multi|NoSortHdr|NoSort|ReadOnly|Sort|SortDesc|WantF2|Icon|Tile|IconSmall|List|Report|c(Default|Black|Silver|Gray|White|Maroon|Red|Purple|Fuchsia|Green|Lime|Olive|Yellow|Navy|Blue|Teal|Aqua))\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGui\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?Add\\s*,\\s*TreeView\\s*,[^,]*)(AltSubmit|Background|Buttons|Checked|HScroll|ImageList|Lines|ReadOnly|WantF2|c(Default|Black|Silver|Gray|White|Maroon|Red|Purple|Fuchsia|Green|Lime|Olive|Yellow|Navy|Blue|Teal|Aqua))\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGuiControl\\b\\s*,?\\s*((\\w+|%\\w+%):\\s*)?)(Text|Move|MoveDraw|Focus|Disable|Enable|Hide|Show|Delete|Choose|ChooseString|Font|Options)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGuiControl\\b\\s*,?[^,]*([-+]))(g|Redraw|AltSubmit|Choose|Disabled|Hidden|Left|Right|Center|Section|Tabstop|Wrap|VScroll|HScroll|Controls|BackgroundTrans|Background|Border|HwndOutputVar|Theme)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGuiControl\\b\\s*,?[^,]*([-+]))(Limit|Lowercase|Multi|Number|Password|ReadOnly|Uppercase|WantCtrlA|WantReturn|WantTab|Wrap|Horz|Left|Range|Wrap|16|0x80|Icon|Default|Check3|Checked|CheckedGray|Group|Checked|Choose|Uppercase|Lowercase|Sort|Limit|Simple|Choose|Multi|ReadOnly|Sort|0x100|LongDate|Time|Choose|ChooseNone|Range|Right|Multi|Range|Colors|[48]|16|Buddy1|Buddy2|Center|Invert|Left|Line|NoTicks|Page|Range|Thick|TickInterval|ToolTip|Vertical|Background|Range|Smooth|Vertical|Choose|Background|Buttons|Left|Right|Bottom|Wrap|AltSubmit|Background|Checked|Count|Grid|Hdr|LV|LV0x10|LV0x20|Multi|NoSortHdr|NoSort|ReadOnly|Sort|SortDesc|WantF2|Icon|Tile|IconSmall|List|Report|AltSubmit|Background|Buttons|Checked|HScroll|ImageList|Lines|ReadOnly|WantF2)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bGuiControlGet\\b\\s*,?[^,]+,\\s*((\\w+|%\\w+%):\\s*)?)(Pos|FocusV??|Enabled|Visible|Hwnd|Name)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bIf\\s+(\\w+|%\\w+%)\\s+)(is\\s+(not\\s+)?(Integer|Float|Number|Digit|Xdigit|Alpha|Upper|Lower|Alnum|Space|Time|Date))\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bIf\\s+(\\w+|%\\w+%)\\s+(not\\s+)?)(between|contains|in)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bIfMsgBox\\s*,?\\s*)(Yes|No|OK|Cancel|Abort|Ignore|Retry|Continue|TryAgain|Timeout)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bInputBox\\b\\s*,?[^,]+,[^,]+,[^,]+,\\s*)(HIDE)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bLoop\\b\\s*,?\\s*)(Files|Parse|Read|Reg)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bLoop\\b\\s*,?\\s*Files\\s*,[^,]+,\\s*)(DF?R?|DR?F?|FD?R?|FR?D?|RD?F?|RF?D?)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bLoop\\b\\s*,?\\s*Parse\\s*,[^,]+,\\s*)(CSV)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bLoop\\b\\s*,?\\s*Reg\\s*,\\s*)(HK(?:EY_LOCAL_MACHINE|EY_USERS|EY_CURRENT_USER|EY_CLASSES_ROOT|EY_CURRENT_CONFIG|LM|U|CU|CR|CC))\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bLoop\\b\\s*,?\\s*Reg\\s*,[^,]+,\\s*)(KV?R?|KR?V?|VK?R?|VR?K?|RK?V?|RV?K?)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bMenu\\b\\s*,?\\s*)Tray\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bMenu\\b\\b\\s*,?[^,]+,\\s*)(Add|Insert|Delete|DeleteAll|Rename|Check|Uncheck|ToggleCheck|Enable|Disable|ToggleEnable|Default|NoDefault|Standard|NoStandard|Icon|NoIcon|Tip|Show|Color|Click|MainWindow|NoMainWindow|UseErrorLevel)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bMouseClick(Drag)?\\b\\s*,?\\s*)(L|Left|R|Right|M|Middle|X1|X2)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bPixelGetColor\\b\\s*,?[^,]+,[^,]+,[^,]+,[^,]*)(Alt|Slow|RGB)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bPixelSearch\\b\\s*,?[^,]+,[^,]+,[^,]+,[^,]+,[^,]+,[^,]+,[^,]+,[^,]+,[^,]*)(Fast|RGB)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bProcess\\b\\s*,?\\s*)(Exist|Close|List|Priority|Wait|WaitClose)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bProcess\\b\\s*,?\\s*Priority\\s*,[^,]+,\\s*)(L|Low|B|BelowNormal|N|Normal|A|AboveNormal|H|High|R|Realtime)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\b(Progress|SplashImage)\\b\\s*,?\\s*)(Off|Show)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bProgress\\b\\s*,?[^,]*)(A|([BM])([12])?|T|Hide|(C[BTW])(Default|Black|Silver|Gray|White|Maroon|Red|Purple|Fuchsia|Green|Lime|Olive|Yellow|Navy|Blue|Teal|Aqua))\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bRegDelete\\b\\s*,?\\s*)(HK(?:EY_LOCAL_MACHINE|EY_USERS|EY_CURRENT_USER|EY_CLASSES_ROOT|EY_CURRENT_CONFIG|LM|U|CU|CR|CC))\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bRegDelete\\b\\s*,?[^,]+,\\s*)(AHK_DEFAULT)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bRegRead\\b\\s*,?[^,]+,\\s*)(HK(?:EY_LOCAL_MACHINE|EY_USERS|EY_CURRENT_USER|EY_CLASSES_ROOT|EY_CURRENT_CONFIG|LM|U|CU|CR|CC))\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bRegWrite\\b\\s*,?\\s*)(REG_(?:SZ|EXPAND_SZ|MULTI_SZ|DWORD|BINARY))\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bRegWrite\\b\\s*,?[^,]+,\\s*)(HK(?:EY_LOCAL_MACHINE|EY_USERS|EY_CURRENT_USER|EY_CLASSES_ROOT|EY_CURRENT_CONFIG|LM|U|CU|CR|CC))\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\b(Run(?:|Wait))\\b\\s*,?[^,]+,[^,]*,\\s*)(Max|Min|Hide|UseErrorLevel)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bSendMode\\b\\s*,?\\s*)(Event|Input|InputThenPlay|Play)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\b(Set(?:Caps|Num|Scroll)LockState)\\b\\s*,?\\s*)(On|Off|AlwaysOn|AlwaysOff)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bSetFormat\\b\\s*,?\\s*)((?:Integer|Float)(?:|Fast))\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bSetFormat\\b\\s*,?\\s*(Integer(?:|Fast))\\s*,\\s*)([DH]|HEX)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bSetMouseDelay\\b\\s*,?[^,]+,\\s*)(Play)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bSetKeyDelay\\b\\s*,?[^,]+,[^,]+,\\s*)(Play)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bSetRegView\\b\\s*,?\\s*)(32|64|Default)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bSetTimer\\b\\s*,?[^,]*,\\s*)(On|Off|Delete)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bSetTitleMatchMode\\b\\s*,?\\s*)(RegEx|Fast|Slow)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bSoundSet\\b\\s*,?[^,]+,\\s*)(MASTER|SPEAKERS|DIGITAL|LINE|MICROPHONE|SYNTH|CD|TELEPHONE|PCSPEAKER|WAVE|AUX|ANALOG|HEADPHONES|N/A)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bSoundSet\\b\\s*,?[^,]+,[^,]*,\\s*)(VOLUME|VOL|ONOFF|MUTE|MONO|LOUDNESS|STEREOENH|BASSBOOST|PAN|QSOUNDPAN|BASS|TREBLE|EQUALIZER)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bSplashImage\\b\\s*,?[^,]+,[^,]*)(A|([BM])([12])?|T|Hide|(C[BTW])(Default|Black|Silver|Gray|White|Maroon|Red|Purple|Fuchsia|Green|Lime|Olive|Yellow|Navy|Blue|Teal|Aqua))\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bStringCaseSense\\b\\s*,?\\s*)(On|Off|Locale)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bSysGet\\b\\s*,?[^,]+,\\s*)(Monitor(?:Count|Primary||WorkArea|Name))\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bThread\\b\\s*,?\\s*)(NoTimers|Priority|Interrupt)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bTransform\\b\\s*,?[^,]+,\\s*)(Unicode|Deref|HTML|Asc|Chr|Mod|Exp|Sqrt|Log|Ln|Round|Ceil|Floor|Abs|Sin|Cos|Tan|ASin|ACos|ATan|Pow|BitNot|BitAnd|BitOr|BitXOr|BitShiftLeft|BitShiftRight)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bWinGet\\b\\s*,?[^,]+,\\s*)(ID|IDLast|PID|ProcessName|ProcessPath|Count|List|MinMax|ControlList|ControlListHwnd|Transparent|TransColor|Style|ExStyle)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "(?i)\\b(?<=\\bWinSet\\b\\s*,?\\s*)(AlwaysOnTop|Bottom|Top|Disable|Enable|Redraw|Style|ExStyle|Region|Transparent|TransColor)\\b",
          "name": "keyword.other.ahk"
        },
        {
          "match": "\\b(?!MsgBox)(?<!\\.)(?i:if|else|switch|case|return|loop|break|for|while|class|extends|catch|finally|throw|try|until|continue|critical|exit|exitapp)\\b",
          "name": "keyword.control.ahk"
        },
        {
          "match": "\\b((0([Xx])\\h*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))(([Ee])([-+])?[0-9]+)?)\\b",
          "name": "constant.numeric.ahk"
        },
        {
          "match": "[-!#\\&*+/^|~]",
          "name": "keyword.operator.arithmetic.ahk"
        },
        {
          "match": ":=|\\.=|=|::",
          "name": "keyword.operator.assignment.ahk"
        },
        {
          "match": "[<>]|<>|[<=>]=|!=",
          "name": "keyword.operator.comparison.ahk"
        }
      ]
    },
    "punctuation": {
      "patterns": [
        {
          "match": "[,:?`]",
          "name": "punctuation.ahk"
        },
        {
          "match": "[]()\\[{}]",
          "name": "punctuation.bracket.ahk"
        },
        {
          "match": "%",
          "name": "punctuation.definition.variable.percent.ahk"
        }
      ]
    },
    "script-block": {
      "patterns": [
        {
          "captures": {
            "1": {
              "name": "keyword.class.ahk"
            },
            "2": {
              "name": "support.class.ahk"
            },
            "4": {
              "name": "keyword.class.ahk"
            },
            "5": {
              "name": "support.class.ahk"
            }
          },
          "example": "class A extends B",
          "match": "(?i:\\b(class)\\b\\s*(\\w+))\\s*((extends)\\s+(\\w+))?",
          "name": "classline.ahk"
        },
        {
          "captures": {
            "1": {
              "name": "entity.name.function.label.ahk"
            },
            "2": {
              "name": "comment.line.semicolon.label.ahk"
            }
          },
          "example": "label:",
          "match": "^\\s*(\\w+:)(\\s+;.*)?$",
          "name": "labelline.ahk"
        },
        {
          "captures": {
            "1": {
              "name": "support.function.ahk"
            },
            "2": {
              "name": "entity.name.function.label.ahk"
            }
          },
          "example": "Gosub label",
          "match": "(?i:(Gosub)(?:\\s*,\\s*|\\s+)(\\w+))",
          "name": "golabel.ahk"
        },
        {
          "captures": {
            "1": {
              "name": "entity.name.function.label.ahk"
            },
            "2": {
              "name": "plaintext"
            }
          },
          "example": "::hot::",
          "match": "(?i: *(:[*0bceiknprsz]{0,2}:.+::)(.+))",
          "name": "hotstring.ahk"
        },
        {
          "captures": {
            "1": {
              "name": "entity.name.function.label.ahk"
            },
            "2": {
              "name": "punctuation.definition.equals.colon"
            }
          },
          "example": "^c::",
          "match": "^\\s*([^\"]+)(::)",
          "name": "hotkeyline.ahk"
        }
      ]
    },
    "string": {
      "patterns": [
        {
          "begin": "^\\s*\\((?!.*\\))",
          "end": "^\\s*\\)",
          "example": "I can't get mean.",
          "name": "string.ahk"
        }
      ]
    },
    "text": {
      "patterns": [
        {
          "match": "\\b(?i:autotrim|Exception|blockinput|click|clipwait|control|controlclick|controlfocus|controlget|controlgetfocus|controlgetpos|controlgettext|controlmove|controlsend|controlsendraw|controlsettext|coordmode|detecthiddentext|detecthiddenwindows|drive|driveget|drivespacefree|edit|envadd|envdiv|envget|envmult|envset|envsub|envupdate|fileappend|filecopy|filecopydir|filecreatedir|filecreateshortcut|filedelete|fileencoding|filegetattrib|filegetshortcut|filegetsize|filegettime|filegetversion|fileinstall|filemove|filemovedir|fileread|filereadline|filerecycle|filerecycleempty|fileremovedir|fileselectfile|fileselectfolder|filesetattrib|filesettime|formattime|getkeystate|gosub|goto|groupactivate|groupadd|groupclose|groupdeactivate|gui|guicontrol|guicontrolget|hotkey|ifequal|ifexist|ifgreater|ifgreaterorequal|ifinstring|ifless|iflessorequal|ifmsgbox|ifnotequal|ifnotexist|ifnotinstring|ifwinactive|ifwinexist|ifwinnotactive|ifwinnotexist|imagesearch|inidelete|iniread|iniwrite|input|inputbox|keyhistory|keywait|listhotkeys|listlines|listvars|menu|mouseclick|mouseclickdrag|mousegetpos|mousemove|msgbox|onexit|outputdebug|pause|pixelgetcolor|pixelsearch|postmessage|process|progress|random|regdelete|regread|regwrite|reload|run|runas|runwait|send|sendevent|sendinput|sendlevel|sendmessage|sendmode|sendplay|sendraw|setbatchlines|setcapslockstate|setcontroldelay|setdefaultmousespeed|setenv|setformat|setkeydelay|setmousedelay|setnumlockstate|setscrolllockstate|setstorecapslockmode|setregview|settimer|settitlematchmode|setwindelay|setworkingdir|shutdown|sleep|sort|soundbeep|soundget|soundgetwavevolume|soundplay|soundset|soundsetwavevolume|splashimage|splashtextoff|splashtexton|splitpath|statusbargettext|statusbarwait|stringcasesense|stringgetpos|stringleft|stringlen|stringlower|stringmid|stringreplace|stringright|stringsplit|stringtrimleft|stringtrimright|stringupper|suspend|sysget|thread|tooltip|transform|traytip|urldownloadtofile|winactivate|winactivatebottom|winclose|winget|wingetactivestats|wingetactivetitle|wingetclass|wingetpos|wingettext|wingettitle|winhide|winkill|winmaximize|winmenuselectitem|winminimize|winminimizeall|winminimizeallundo|winmove|winrestore|winset|winsettitle|winshow|winwait|winwaitactive|winwaitclose|winwaitnotactive)\\b",
          "name": "support.function.ahk"
        },
        {
          "match": "\\b(?!MsgBox)(?i:abs|Push|length|RemoveAt|Count|InsertAt|ObjGetCapacity|ObjRemoveAt|ObjInsertAt|StrReplace|ObjDelete|acos|asc|asin|atan|ceil|chr|cos|ObjAddRef|ObjRelease|ComObject|comobjcreate|comobjactive|comobjarray|comobjconnect|comobjenwrap|comobjerror|comobjflags|comobjget|comobjmissing|comobjparameter|comobjquery|comobjtype|comobjunwrap|comobjvalue|dllcall|exp|fileexist|fileopen|floor|format|func|getkeyname|getkeyvk|getkeysc|getkeystate|il_add|il_create|il_destroy|instr|isbyref|isfunc|islabel|isobject|ln|log|ltrim|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|mod|onmessage|numget|numput|regexmatch|regexreplace|registercallback|round|rtrim|sb_seticon|sb_setparts|sb_settext|sin|sqrt|strget|strlen|strput|strsplit|substr|tan|trim|tv_add|tv_delete|tv_getchild|tv_getcount|tv_getnext|tv_get|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist)(?=\\()\\b",
          "name": "support.function.ahk"
        },
        {
          "match": "\\b(?!MsgBox)(?<=\\.)(?i:read|write|readline|writeline|readuint|readint|readint64|readshort|readushort|readchar|readuchar|readdouble|readfloat|writeuint|writeint|writeint64|writeshort|writeushort|writechar|writeuchar|writedouble|writefloat|rawread|rawwrite|seek|tell|close|insert|remove|minindex|maxindex|setcapacity|getcapacity|getaddress|newenum|haskey|clone|isoptional|__new|__call|__get|__set|__delete)(?=\\()\\b",
          "name": "support.function.ahk"
        },
        {
          "example": "fun(",
          "match": "\\b(?!MsgBox)\\w+\\s*(?=\\()",
          "name": "entity.name.function.ahk"
        },
        {
          "begin": "(\")",
          "beginCaptures": {
            "1": {
              "name": "punctuation.definition.string.begin.ahk"
            }
          },
          "end": "(\")(?!\")|^",
          "endCaptures": {
            "1": {
              "name": "punctuation.definition.string.end.ahk"
            }
          },
          "example": "\"string\"",
          "name": "string.quoted.double.ahk",
          "patterns": [
            {
              "match": "\"\"",
              "name": "constant.character.escape.ahk"
            }
          ]
        },
        {
          "match": "\\w+",
          "name": "variable.def.ahk"
        }
      ]
    }
  },
  "scopeName": "source.ahk"
}
