# SciTE settings for AutoHotkey 1 files # Updated 2006/11/30 (1.0.46.0.00) by Philippe Lhoste (PhiLho) # With input from Roman Hubacek, Serenity and dwuttke # AutoHotkey program installation directory: # for API file access, running scripts (F5) and getting help on keywords (F1) autohotkeydir=C:\Program Files\AutoHotkey file.patterns.ahk=*.ahk lexer.$(file.patterns.ahk)=ahk1 filter.ahk=AutoHotkey (ahk)|$(file.patterns.ahk)| word.chars.ahk1=$(chars.alpha)$(chars.numeric)_$#@?[] word.characters.$(file.patterns.ahk)=$(word.chars.ahk1) # API file for AutoHotkey can be found in Extras\Editors\Notepad++ directory api.$(file.patterns.ahk)=$(autohotkeydir)\Extras\Editors\Notepad++\AHK Autohotkey.api #~ autocomplete.ahk1.ignorecase=1 #~ autocomplete.ahk1.start.characters=$(chars.alpha)# calltip.ahk1.word.characters=$(word.chars.ahk1) calltip.ahk1.parameters.start= (, comment.block.ahk1=;~ comment.block.at.line.start.ahk1=1 comment.stream.start.ahk1=/* comment.stream.end.ahk1=*/ indent.maintain.$(file.patterns.ahk)=1 indent.size.$(file.patterns.ahk)=4 tab.size.$(file.patterns.ahk)=4 use.tabs.$(file.patterns.ahk)=1 # Keywords must be in lowercase for case-insensitive comparison # Flow of control keywords.$(file.patterns.ahk)=\ break continue else exit exitapp gosub goto if ifequal ifexist ifgreater \ ifgreaterorequal ifinstring ifless iflessorequal ifmsgbox ifnotequal \ ifnotexist ifnotinstring ifwinactive ifwinexist ifwinnotactive ifwinnotexist \ loop onexit pause repeat return setbatchlines settimer sleep suspend \ static global local byref # Commands keywords2.$(file.patterns.ahk)=\ autotrim blockinput clipwait control controlclick controlfocus \ controlget controlgetfocus controlgetpos controlgettext controlmove \ controlsend controlsendraw controlsettext coordmode critical detecthiddentext \ detecthiddenwindows drive driveget drivespacefree edit endrepeat envadd \ envdiv envget envmult envset envsub envupdate fileappend filecopy \ filecopydir filecreatedir filecreateshortcut filedelete filegetattrib \ filegetshortcut filegetsize filegettime filegetversion fileinstall filemove \ filemovedir fileread filereadline filerecycle filerecycleempty fileremovedir \ fileselectfile fileselectfolder filesetattrib filesettime formattime \ getkeystate groupactivate groupadd groupclose groupdeactivate gui \ guicontrol guicontrolget hideautoitwin hotkey \ imagesearch inidelete iniread iniwrite input inputbox keyhistory keywait \ listhotkeys listlines listvars menu mouseclick mouseclickdrag mousegetpos \ mousemove msgbox numget numset outputdebug pixelgetcolor pixelsearch \ postmessage process progress random regdelete registercallback regread regwrite reload \ run runas runwait \ send sendevent sendinput sendmessage sendmode sendplay sendraw \ setcapslockstate setcontroldelay setdefaultmousespeed setenv setformat \ setkeydelay setmousedelay setnumlockstate setscrolllockstate \ setstorecapslockmode settitlematchmode setwindelay setworkingdir \ shutdown 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 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 # Functions keywords3.$(file.patterns.ahk)=\ abs acos asc asin atan ceil chr cos dllcall exp fileexist floor getkeystate \ il_add il_create il_destroy instr islabel ln log lv_add lv_delete lv_deletecol \ lv_getcount lv_getnext lv_gettext lv_insert lv_insertcol lv_modify \ lv_modifycol lv_setimagelist mod onmessage round \ regexmatch regexreplace \ sb_seticon sb_setparts sb_settext sin sqrt strlen substr tan \ 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 # Directives keywords4.$(file.patterns.ahk)=\ allowsamelinecomments clipboardtimeout commentflag errorstdout escapechar \ hotkeyinterval hotkeymodifiertimeout hotstring ifwinactive ifwinexist include \ includeagain installkeybdhook installmousehook keyhistory ltrim \ maxhotkeysperinterval maxmem maxthreads maxthreadsbuffer maxthreadsperhotkey \ noenv notrayicon persistent singleinstance usehook winactivateforce # Keys & buttons keywords5.$(file.patterns.ahk)=\ 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 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 \ blind click raw # Variables keywords6.$(file.patterns.ahk)=\ a_ahkpath a_ahkversion a_appdata a_appdatacommon a_autotrim a_batchlines \ a_caretx a_carety a_computername a_controldelay a_cursor \ a_dd a_ddd a_dddd a_defaultmousespeed a_desktop a_desktopcommon \ a_detecthiddentext a_detecthiddenwindows a_endchar \ a_eventinfo a_exitreason 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_ipaddress1 a_ipaddress2 a_ipaddress3 a_ipaddress4 a_isadmin a_iscompiled \ a_issuspended a_keydelay a_language a_lasterror a_linefile a_linenumber \ a_loopfield a_loopfileattrib a_loopfiledir a_loopfileext a_loopfilefullpath \ a_loopfilelongpath a_loopfilename 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_mm a_mmm a_mmmm a_mon a_mousedelay a_msec a_mydocuments \ a_now a_nowutc a_numbatchlines a_ostype a_osversion a_priorhotkey \ a_programfiles a_programs a_programscommon a_screenheight a_screenwidth \ a_scriptdir a_scriptfullpath 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 # "Keywords" (special parameters) # Since these keywords may appear nearly anywhere as command parameters, # which are treated as regular strings, I choose to put here only non-English words, # to avoid having words like 'error', 'close' or 'section' highlighted in regular sentences (raw strings). # For consistency, I will exclude some words belonging to a category, like belownormal or xdigit. # If you are comfortable with the above problem, feel free to include the whole list. keywords7.$(file.patterns.ahk)=\ ltrim rtrim join \ ahk_id ahk_pid ahk_class ahk_group \ processname minmax controllist statuscd filesystem setlabel \ alwaysontop mainwindow nomainwindow useerrorlevel \ altsubmit hscroll vscroll imagelist wantctrla wantf2 vis visfirst \ wantreturn backgroundtrans \ minimizebox maximizebox sysmenu toolwindow exstyle \ check3 checkedgray readonly notab \ lastfound lastfoundexist \ alttab shiftalttab alttabmenu alttabandmenu alttabmenudismiss \ controllisthwnd hwnd\ deref pow bitnot bitand bitor bitxor bitshiftleft bitshiftright \ sendandmouse mousemove mousemouveoff \ hkey_local_machine hkey_users hkey_current_user hkey_classes_root \ hkey_current_config hklm hku hkcu hkcr hkcc \ reg_sz reg_expand_sz reg_multi_sz reg_dword reg_qword reg_binary \ reg_link reg_resource_list reg_full_resource_descriptor \ reg_resource_requirements_list reg_dword_big_endian \ regex #~ pixel mouse screen relative rgb \ #~ low belownormal normal abovenormal high realtime \ #~ between contains in is integer float number digit xdigit \ #~ alpha upper lower alnum time date \ #~ not or and \ #~ topmost top bottom transparent transcolor redraw region id idlast \ #~ count list capacity eject lock unlock \ #~ label serial type status \ #~ seconds minutes hours days \ #~ read parse \ #~ logoff close error single shutdown menu exit reload \ #~ tray add rename check uncheck togglecheck enable disable toggleenable default \ #~ nodefault standard nostandard color delete deleteall icon noicon tip click \ #~ show \ #~ edit progress hotkey text picture pic groupbox button \ #~ checkbox radio dropdownlist ddl combobox statusbar treeview \ #~ listbox listview datetime monthcal updown slider tab \ #~ iconsmall tile report sortdesc nosort nosorthdr grid hdr autosize range \ #~ xm ym ys xs xp yp \ #~ font resize owner submit nohide minimize maximize restore noactivate na \ #~ cancel destroy center \ #~ margin owndialogs guiescape guiclose guisize guicontextmenu guidropfiles \ #~ tabstop section wrap border top bottom buttons \ #~ expand first lines \ #~ number uppercase lowercase limit password multi group background \ #~ bold italic strike underline norm theme caption delimiter \ #~ flash style checked \ #~ password hidden left right center section move \ #~ focus hide choose choosestring text pos enabled disabled visible \ #~ notimers interrupt priority waitclose unicode \ #~ yes no ok cancel abort retry ignore \ #~ on off all send \ # Base (background, base font) style.ahk1.32=$(font.base) # Default (everything not below: spaces, untyped parameters) style.ahk1.0=$(font.text.base) # Line comment (; syntax) style.ahk1.1=$(colour.code.comment.line),$(font.text.comment) # Block comment (/*...*/ syntax) style.ahk1.2=$(colour.code.comment.box),$(font.embedded.comment) # Escape (`x) style.ahk1.3=$(style.ahk1.6),back:#E0EEFF # Syntax operator style.ahk1.4=$(colour.preproc),bold # Expression operator style.ahk1.5=$(colour.operator) # String style.ahk1.6=$(colour.string),$(font.text.base) # Number style.ahk1.7=$(colour.number),$(font.code.base) # Identifier (variable & function call) style.ahk1.8=$(font.code.base) # Variable dereferencing %varName% style.ahk1.9=$(style.ahk1.8),back:#F0F0FF # Label, Hotkeys & Hotstrings (& Function definition?) style.ahk1.10=font:Lucida Console,size:9,bold,back:#FFFFE0,eolfilled # Keyword - Flow of control style.ahk1.11=$(colour.other.comment),bold # Keyword - Commands style.ahk1.12=$(colour.keyword),$(font.text.base),bold # Keyword - Functions style.ahk1.13=$(style.ahk1.8),$(colour.keyword) # Keyword - Directives style.ahk1.14=$(style.ahk1.12),back:#E0F0FF # Keyword - Keys & buttons style.ahk1.15=font:Century Gothic,size:10,$(colour.other.comment) # Keyword - Variables style.ahk1.16=$(style.ahk1.8),$(colour.other.comment) # Keyword - special parameters ("Keywords") style.ahk1.17=$(style.ahk1.13),italics # Keyword - User defined style.ahk1.18=fore:#800020,bold # Variable keyword (built-in) dereferencing %A_xxx% style.ahk1.19=$(style.ahk1.16),back:#F0F0FF # Error (unclosed string, unknown operator, invalid dereferencing, etc.) style.ahk1.20=back:#FFC0C0 # Braces are only matched in syntax operator style braces.ahk1.style=4 # Braces are only matched in operator style #~ braces.ahk1.style=5 # Braces are matched anywhere (beware of comments and strings! #~ braces.ahk1.style=0 # Command to run script (F5) command.go.$(file.patterns.ahk)="$(autohotkeydir)\AutoHotkey.exe" /ErrorStdOut "$(FileNameExt)" # Commands to compile script (F7 & Ctrl+F7) command.compile.$(file.patterns.ahk)=$(autohotkeydir)\Compiler\Ahk2Exe.exe /in "$(FilePath)" command.build.$(file.patterns.ahk)="$(autohotkeydir)\Compiler\Ahk2Exe.exe" /in "$(FilePath)" # Help on keywords (F1) command.help.$(file.patterns.ahk)=$(CurrentWord)!$(autohotkeydir)\AutoHotkey.chm command.help.subsystem.$(file.patterns.ahk)=4