Jump to content

Recommended Posts

Posted
On 10/11/2025 at 1:26 AM, jpm said:

Is there a way to suppress the Local warning on the a main scriptimage.thumb.png.31bba019f9c070eb9fac5b58f46108b5.png

You're supposed to be able to set #AutoIt3Wrapper_AU3Check_Parameters with the flags you want (which would be -w- 4 for turning off the local in global scope warning) but turns out there's a bug with reading them in for the diagnostics that I'm fixing right now.

`

  • 4 weeks later...
  • 3 months later...
Posted

Released v1.4.0!

Added

  • Map variable IntelliSense - Intelligent key completions when accessing AutoIt Map variables
    • Shows available keys when typing a Map variable name (e.g., typing $map shows known keys)
    • Tracks Map keys across your workspace and included files
    • Works with both direct assignments ($map["key"] = value) and declarations with initial keys
    • Configuration options to tune behavior:
      • autoit.maps.enableIntelligence - Enable/disable Map intelligence (default: true)
      • autoit.maps.includeDepth - Maximum depth for resolving #include files (default: 3, range: 0-10)
      • autoit.maps.showFunctionKeys - Show Map keys assigned in functions (default: true)
    • See docs/map-support.md for performance tuning recommendations
  • Scope-aware variable IntelliSense - Intelligent context-aware variable completions that respect AutoIt's scoping rules
    • Shows only accessible variables at cursor position (local, static, global, and parameters)
    • Prioritizes local variables over globals for better relevance
    • Respects function boundaries and AutoIt's scope rules (global and function-level scoping)
    • Extends to global variables from #include files
    • Intelligent debouncing (500ms) with concurrent update handling
    • Fallback to regex-based completion when service is unavailable
  • Ignore AutoIt Tidy backup files from diagnostics

Fixed

  • Improved error handling for variable tracking updates during configuration changes
  • Enhanced stderr and process error handling in Au3Check execution

Changed

  • Enhanced README documentation with Map intelligence feature details
  • Enhanced variable parsing with support for comma-separated declarations (e.g., Global $a, $b, $c) and improved string handling for AutoIt's double-character escaping
  • Extracted formatter constants into constants.js file
  • Syntax Highlighting Improvements
    • Migrated syntax definition from XML to JSON format (autoit.tmLanguage.json) for better maintainability and IDE support
    • Enhanced function pattern matching to distinguish function declarations from function calls with dedicated scopes
    • Consolidated all 98+ AutoIt macros into dedicated pattern repository for improved consistency
    • Improved numeric constant parsing with better hexadecimal, decimal, and scientific notation matching
    • Refined operator patterns for comparison, assignment, arithmetic, and concatenation with proper precedence
    • Fixed multi-line string handling by refining string end patterns
    • Enhanced preprocessor directive matching (#include, #pragma, #region, etc.) for better accuracy
    • Improved comment block pattern matching (#comments-start/#cs directives)
    • Reorganized send-key patterns into 13 categorized groups (browser keys, media keys, navigation, numpad, lock, editing, system keys) for granular theme customization

 

Rate and View on VS Code Marketplace

Rate and View on OpenVSX

Star & Submit Issues on GitHub

  • 1 month later...
Posted

Released v1.5.0!

Added

  • VS Code variable support in path settings: settings that accept file paths (e.g. autoit.aiPath) now resolve VS Code variables such as ${workspaceFolder} and ${userHome} (#240) (29d494b)

Fixed

  • Includes without trailing space now colorize correctly.
  • Variable completions not appearing on startup: completions now initialize correctly during extension activation. The scope-aware path also falls back to regex-based completion when the parser returns empty results.
  • Signature provider crashes on malformed input: dynamic regex fragments are now escaped in parameter and header documentation extraction, preventing crashes from malformed parameter or function names.
  • Signature parsing errors: parameter and header documentation extraction now returns safe defaults instead of throwing on unexpected input.
  • Smart-help errors with special characters: query text is now escaped before regex construction, preventing invalid regular expression errors.
  • Go to Definition (F12) performance regression: introduced in v1.4.0 — three improvements that together restore lookup speed to parity with v1.1.0/v1.2.0
    • Simplified the variable-definition regex to eliminate backtracking on large files
    • Added a stat grace period to skip redundant filesystem checks on rapid repeated lookups
    • Added a per-document definition cache that is evicted on edit
  • Function declaration parameter scopes: TextMate grammar now keeps the declaration scope active through the closing parenthesis and assigns a dedicated variable.parameter.autoit scope to parameters (965c5f6)
  • Error handling in diagnostics and AI config: improved debug logging and error recovery in diagnosticUtils, ai_config, and extension activation paths (0d52962)
  • Function parameter parsing with quoted parentheses: parser and TextMate grammar now correctly handle ) characters inside quoted strings in function default parameter values (#243) (40c727f)

Changed

  • Separated some preprocesors to be colored closer to Scite.
    • Token scope (keyword.control.directives.autoit) now is used for Include-Once, NoTrayIcon, RequireAdmin and OnAutoItStartRegister
    • Token scope (meta.preprocessor.autoit) is used for all others.
  • Improved regex patterns for #include directive resolution and function description matching in the utility module (640699a)

Removed

  • Removed deprecated mainFunctions.js static AutoIt function completions file (1,645 lines); dynamic completions take over fully (fe8e176)
  • Removed deprecated udf_WinAPITheme.js completions file (b5f2b6a)

 

Rate and View on VS Code Marketplace

Rate and View on OpenVSX

Star & Submit Issues on GitHub

Posted
12 hours ago, LoganCH said:

Released v1.5.0!

I just wanted to give a quick Thank You for your continued work and efforts with this fantastic extension. I don't know what I would do without it.

Your time and efforts are greatly appreciated and you are very well organized. Thank you! :)

  • 2 weeks later...
Posted

Fix folding issue with single-line If statements

At first I thought about doing it as a PR, but I'm not familiar with your work (I use it occasionally.)
so I just thought I'd inform you here.

Spoiler

Title: Fix folding issue with single-line If statements

Description:

This PR fixes a bug where the code folding mechanism breaks when using single-line If...Then statements.

The Issue: The current increaseIndentPattern and folding.markers.start regex triggers a new folding block whenever it encounters the word If at the start of a line. In AutoIt, single-line If statements (e.g., If $condition Then $action) do not require an EndIf. Because the parser expects an EndIf that never comes, it incorrectly "swallows" all subsequent code, breaking #Region folding and indentation for the rest of the script.

The Solution: Updated the regex for If to ensure it only initiates a folding block when the Then keyword is at the end of the line (optionally followed by a comment). If there is any code following the Then keyword on the same line, it is correctly identified as a single-line statement and ignored by the folding logic.

Changed Regex: From: ([iI]f\\b) To: (?i:If)\\s+.*\\s+Then(?:\\s*;.*)?$ (or the equivalent string escaped for JSON)

in the file autoit-language-configuration.json

from:

"folding": {
    "offSide": true,
    "markers": {
      "start": "^\\s*\\s*((#?[Rr]egion\\b)|([Ff]unc\\b)|([iI]f\\b)|([sS]witch\\b)|([fF]or\\b)|([wW]hile\\b)|([wW]ith\\b)|(#c(?:omments\\-start|s)))\\b",
      "end": "^\\s*\\s*((#?[Ee]nd[Rr]egion\\b)|([Ee]nd[Ff]unc)|([eE]nd[iI]f)|([eE]nd[sS]witch)|([nN]ext)|([wW][eE]nd)|([eE]nd[wW]ith)|(#c(?:omments\\-end|e)))\\b"
    }
  },

to:

"folding": {
    "offSide": true,
    "markers": {
      "start": "^\\s*(?:#?[Rr]egion\\b|[Ff]unc\\b|(?i:If)\\s+.*\\s+Then(?:\\s*;.*)?$|[sS]witch\\b|[fF]or\\b|[wW]hile\\b|[wW]ith\\b|#(?:comments-start|cs))",
      "end": "^\\s*(?:#?[Ee]nd[Rr]egion\\b|[Ee]nd[Ff]unc|[eE]nd[iI]f|[eE]nd[sS]witch|[nN]ext|[wW][eE]nd|[eE]nd[wW]ith|#(?:comments-end|ce))"
    }
  },

 

 

I know that I know nothing

Posted

Very nice ioa747,

6 minutes ago, ioa747 said:

Fix folding issue with single-line If statements

I tried to do a similar task too once, but I found that continued "If"s would cause issues.

if (1= 1) And _
(2 = 2) Then

 

LibreOffice UDF  

Scite4AutoIt Spell-Checker Using LibreOffice

WPS Office adapter — Use MS Word UDFs with WPS Office!

LibreOffice API Inspector tools

Spoiler

"Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions."

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...