AutoHotkey Community

It is currently May 27th, 2012, 1:37 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: May 28th, 2009, 6:37 pm 
Offline

Joined: March 27th, 2008, 2:14 pm
Posts: 700
This is a space delimited list of the names of commands, functions, built-in variables, and other keywords that might be helpful for determining syntax highlighting.

I will also add regex patterns that should match specific parts of ahk syntax. (e.g. comment line)

Preprocessors:
Quote:
AllowSameLineComments ClipboardTimeout CommentFlag Delimiter DerefChar ErrorStdOUt EscapeChar HotkeyInterval HotkeyModifierTimeout Hotstring IfWinActive IfWinExist Include IncludeAgain InstallKeybdHook InstallMouseHook KeyHistory LTrim MayHotkeysPerInterval MaxMem MaxThreads MaxThreadsBuffer MaxThreadsPerHotkey NoEnv NoTrayIcon Persistent SingleInstance UseHook WinActivateForce


Functions:
Quote:
FileExist GetKeyState InStr RegExMatch RegExReplace SubStr StrLen WinActive WinExist Asc Chr DllCall IsFunc IsLabel NumGet NumPut OnMessage RegisterCallback VarSetCapacity Abs Ceil Exp Floor Log Ln Mod Round Sqrt Sin Cos Tan ASin ACos ATan LV_Add LV_GetText LV_GetNext LV_GetCount LV_DeleteCol LV_InsertCol LV_ModifyCol LV_Delete LV_Modify LV_Insert TV_Add TV_Modify TV_Delete TV_GetSelection TV_GetCount TV_GetParent TV_GetChild TV_GetPrev TV_GetNext TV_GetText TV_Get


Variables:
Quote:
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_GuiControl A_GuiControlEvent A_GuiEvent A_GuiHeight A_GuiWidth A_GuiX A_GuiY A_Hour A_IconFile A_IconHidden A_IconNumber A_IconTip A_Index A_Index A_IPAddress1 A_IPAddress2 A_IPAddress3 A_IPAddress4 A_IsAdmin A_IsCompiled A_IsCritical A_IsPaused A_IsSuspended A_KeyDelay A_Language A_LastError A_LineFile A_LineNumber A_LoopField A_LoopField A_LoopFileAttrib A_LoopFileDir A_LoopFileExt A_LoopFileFullPath A_LoopFileLongPath A_LoopFileName A_LoopFileName, etc. A_LoopFileShortName A_LoopFileShortPath A_LoopFileSize A_LoopFileSizeKB A_LoopFileSizeMB A_LoopFileTimeAccessed A_LoopFileTimeCreated A_LoopFileTimeModified A_LoopReadLine A_LoopReadLine A_LoopRegName, etc. A_Min A_MM A_MMM A_MMMM A_MouseDelay A_MSec A_MyDocuments A_Now A_NowUTC 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_YWeek A_YYYY Clipboard ClipboardAll ComSpec ErrorLevel ProgramFiles


Commands:
Quote:
AutoTrim BlockInput Break Click ClipWait Continue Control ControlClick ControlFocus ControlGet ControlGetFocus ControlGetPos ControlGetText ControlMove ControlSend ControlSendRaw ControlSetText CoordMode Critical DetectHiddenText DetectHiddenWindows Drive DriveGet DriveSpaceFree Edit Else EnvAdd EnvDiv EnvGet EnvMult EnvSet EnvSub EnvUpdate Exit ExitApp 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 Gosub Goto GroupActivate GroupAdd GroupClose GroupDeactivate GUI GuiControl GuiControlGet HideAutoItWin Hotkey if IfEqual IfExist IfGreater IfGreaterOrEqual IfInString IfLess IfLessOrEqual IfMsgBox IfNotEqual IfWinActive IfWinExist IfWinNotActive IfWinNotExist ImageSearch IniDelete IniRead IniWrite Input InputBox KeyHistory KeyWait LeftClick LeftClickDrag ListHotkeys ListLines ListVars Loop Menu MouseClick MouseClickDrag MouseGetPos MouseMove MsgBox OnExit OutputDebug Pause PixelGetColor PixelSearch PostMessage Process Progress Random RegDelete RegRead RegWrite Reload Return


Hotkeys:
Quote:
Lbutton Rbutton Mbutton WheelDown WheelUp WheelLeft WheelRight XButton1 XButton2 Space Tab Enter Return Escape Esc Backspace BS Delete Del Insert Ins Home End PgUp PgDn Up Down Left Right ScrollLock CapsLock NumLock Numpad0 Numpad1 Numpad2 Numpad3 Numpad4 Numpad5 Numpad6 Numpad7 Numpad8 Numpad9 NumpadDot NumpadDiv NumpadMult NumpadAdd NumpadSub NumpadEnter NumpadIns NumpadEnd NumpadDown NumpadPgDn NumpadLeft NumpadClear NumpadRight NumpadHome NumpadUp NumpadPgUp NumpadDel NumpadDiv NumpadMult NumpadAdd NumpadSub 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 AppsKey Lwin Rwin Control Ctrl Alt Shift Lcontrol LCtrl Rcontrol RCtrl Lshift Rshift LAlt RAlt PrintScreen CtrlBreak Pause Break 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 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 SC\d{3} VK[\da-fA-F]{2}


Operators:
Quote:
math: ++ -- ** / // + -
boolean: > < >= <= and or not && || ! = == <> !=
reference: & *
bitwise: ~ >> << & ^ |
assignment: := += -= *= /= //= .= |= &= ^= >>= <<=
other: ?:

Needed:
  • The few built in labels
  • Hotkeys


If I am missing anything, or you have an idea or pattern you would like to add, you're very welcome to! Thanks for looking. :D

_________________
Scripts - License


Last edited by infogulch on May 28th, 2009, 9:36 pm, edited 6 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 28th, 2009, 6:37 pm 
Offline

Joined: March 27th, 2008, 2:14 pm
Posts: 700
Here are some regex patterns that are supposed to match specific parts of autohotkey syntax for highlighting differently:

  • Comment Line:
    Code:
    (?<=^|\s);[^\r\n]*
    ToDo: it shouldn't count in quoted strings.
  • Comment Block:
    Code:
    (?:^|[\r\n]\s*)\/\*.*?\*\/
  • Number:
    Code:
    -?\b(?:(?:0x[\da-fA-F]+)|(?:\d+(?:\.\d+(?:[eE]\d+)?)?))\b
  • Quoted String:
    Code:
    "(?:[^\""\n\r]|"")*"

Need patterns to match...
  • The valid characters of a user variable
  • The name of the call of a user defined function
  • The name of the definition of a user defined function.
  • A label
  • A hotkey

_________________
Scripts - License


Last edited by infogulch on May 28th, 2009, 8:04 pm, edited 2 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject: Thanks
PostPosted: May 28th, 2009, 7:38 pm 
Offline

Joined: March 27th, 2008, 2:14 pm
Posts: 700
Thanks to:
  • Titan: fixing comment line/block regex

_________________
Scripts - License


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 19 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group