Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,17 @@ Open include files at cursor position with Alt+I, with support for custom includ

Run multiple scripts simultaneously with separate output panels for each.

### Syntax Highlighting

Comprehensive syntax highlighting for AutoIt code, including:

- Keywords, functions, and macros
- Variables, constants, and strings
- Comments and documentation blocks
- **COM object properties and methods** with distinct highlighting for dot notation (e.g., `$oExcel.Workbooks.Add()`)

COM objects are highlighted with a special token scope (`support.class.com.autoit`), allowing themes to style them distinctly from regular functions.

---

## Platform Support
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- COM object syntax highlighting for properties and methods using dot notation
- Distinct token scopes for COM identifiers (`support.class.com.autoit`) to enable theme-specific styling
- File path validation to prevent path traversal attacks
- Parameter safety warnings for `autoit.consoleParams` to detect potentially dangerous shell metacharacters
- Workspace symbol performance optimizations with batch processing to prevent UI freezing on large projects
Expand All @@ -23,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Function pattern incorrectly matching COM object methods (e.g., `$obj.Method()` now correctly identified as COM, not function)
- Command injection risk in registry update functionality by replacing `exec` with `execFile` for safer argument handling
- Multiple global output panels opening for AutoIt on startup
- Memory leak in completion provider where include cache grew indefinitely across document switches
Expand Down
8 changes: 7 additions & 1 deletion syntaxes/autoit.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,16 @@
</dict>
<dict>
<key>match</key>
<string>[a-zA-Z_]+[\w_]*(?=\()</string>
<string>(?<!\.)\b[a-zA-Z_]\w*(?=\()</string>
<key>name</key>
<string>entity.name.function.autoit</string>
</dict>
<dict>
<key>name</key>
<string>support.class.com.autoit</string>
<key>match</key>
<string>(?<=\.)\b[a-zA-Z_]\w*\b</string>
</dict>
<dict>
<key>match</key>
<string>@\b(?i:trayiconflashing|a(?:utoit(?:version|x64|pid|exe)|ppdata(?:common)?dir)|desktopheight|(?:gui_drop|tray_)id|(?:osbuil|gui_(?:drag|ctrl)i|exitmetho|(?:sw_showm(?:in|ax)imiz|hotkeypress|extend)e|compile)d|(?:(?:scriptfull|home)pat|desktop(?:refres|widt|dept))h|(?:logond(?:nsd)?omai|m[io])n|(?:sw_(?:shownoactivat|m(?:in|ax)imiz)|sw_showminnoactiv|(?:script|user)nam|gui_(?:ctrlhand|winhand|dragfi)l|home(?:shar|driv)|computernam|sw_restor|exitcod|sw_hid|ostyp|(?:trayiconvisi|sw_(?:dis|en)a)bl)e|(?:scriptlinenumbe|logonserve|desktopdi|erro|yea|hou)r|(?:sw_showdefaul|kblayou)t|sw_shown(?:ormal|a)|c(?:puarch|rlf|om(?:_eventobj|spec))|m(?:uilang|day)|ipaddress[1-4]|(?:localappdata|userprofile|working|system|temp|(?:mydocument|window)s|programfiles|commonfiles)dir|(?:start(?:menu|up)|favorites|programs)(?:common)?dir|numparams|osversion|sw_show|osarch|oslang|msec|[wy]day|sec|tab|lf|cr|scriptdir|osservicepack|sw_(?:un)?lock|d(?:ocuments|esktop)commondir)\b</string>
Expand Down