Skip to content

Commit 00e8639

Browse files
authored
v1.4.2
## Version 1.4.2 - (2026-01-06) ### ⚡ Synchronous Execution & Enhanced Automation This major update bridges the gap between the asynchronous nature of WebView2 and the procedural logic of AutoIt, introducing synchronous script results and specialized automation controls. #### **Added** - **Synchronous Scripting** (DispId 188): - **ExecuteScriptWithResult(string script)**: **(188)** Executes JavaScript and returns the result directly to AutoIt in a single line. Includes a 5-second safety timeout and automatic JSON unescaping for clean string results. - **Automation & Layout Controls** (DispIds 189, 191, 193): - **AddInitializationScript(string script)**: **(187)** Injects a script that persists across navigations and refreshes, executing automatically on every new document. - **SetAutoResize(bool enabled)**: **(189)** Enables "Smart Anchor" resizing using Win32 subclassing. Works with non-.NET parent containers (like AutoIt) and maintains top-left offsets. Sends "WINDOW_RESIZED" to AutoIt on completion. - **ExecuteScriptOnPage(string script)**: **(191)** A dedicated method for immediate, high-priority script execution on the current page. - **ClearCache()**: **(193)** Targeted removal of Disk Cache and Local Storage to ensure the browser always loads the freshest content. - **Unified Context Menu Handling** (DispIds 190, 194): - **`OnContextMenuRequested(link, x, y, selection)`**: **(190)** [Event] Provides a rich, simplified context event with direct access to the URL, coordinates, and selected text under the cursor. - **`CustomMenuEnabled`**: **(194)** [Property] A Master switch to enable or disable custom menu interception. - **Advanced Data Binding** (DispIds 185 - 186): - **BindJsonToBrowser(variableName)**: **(185)** Securely binds internal JSON data to a JavaScript variable. Updated to ensure 100% COM compatibility with legacy registrations. - **SyncInternalData(json, bindTo)**: **(186)** High-performance helper that parses raw JSON and binds it to a browser variable in a single atomic operation. - **Integrated Base64 Support (JsonParser)** (DispIds 222 - 224): - **EncodeB64 / DecodeB64**: **(222, 223)** Native Base64 processing directly within the JSON parser, eliminating the need for external Base64 libraries. - **DecodeB64ToFile(b64, path)**: **(224)** Decodes a Base64 stream and saves it directly to disk (perfect for screenshots and binary downloads). ### Changed - **Automation & Layout Controls** (DispIds 115, 116, 184): - **InjectCss(string cssCode)**: **(115)** Inject CSS (Persistence to run on every refresh) - **AddInitializationScript(string script)**: **(116)** Clear Injected CSS. - **ClearInjectedCss()**: **(184)** Injects a script that persists across navigations and refreshes, executing automatically on every new document. #### **Improvements** - **Legacy Compatibility**: The context menu logic has been completely redesigned to support both the new parameter-based event (v1.4.2) and the legacy JSON event (v1.4.1) simultaneously. - **Robustness**: JSON parsing now automatically trims whitespace, and all browser interactions include enhanced internal try-catch blocks. Added a Global COM Error Handler in the showcase demo for professional diagnostics. - **Unified Messaging**: `WINDOW_RESIZED` now includes explicit dimensions (`Width|Height`) in the data payload for better reactive UI control. - **Robust Auto-Resizing**: Replaced `Dock.Fill` with a Native Subclassing (`NativeWindow`) mechanism to intercept `WM_SIZE` messages directly from the OS, ensuring perfect synchronization even with non-WinForms parent handles.
1 parent 47544ce commit 00e8639

9 files changed

Lines changed: 1397 additions & 60 deletions

File tree

bin/NetWebView2Lib.dll

7 KB
Binary file not shown.

bin/NetWebView2Lib.tlb

1.55 KB
Binary file not shown.

bin/RegCleaner.au3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ _GUICtrlListView_SetExtendedListViewStyle($idListView, BitOR($LVS_EX_CHECKBOXES,
1919
_GUICtrlListView_SetColumnWidth($idListView, 0, $iWidth * 0.6)
2020
_GUICtrlListView_SetColumnWidth($idListView, 1, $iWidth * 0.4)
2121
$iHeight += 20
22-
Local $idStatus = GUICtrlCreateLabel("Scanning registry... please wait...", 10, $iHeight, $iWidth - 210, 80)
22+
Local $idStatus = GUICtrlCreateLabel("Scanning registry... please wait...", 10, $iHeight, $iWidth - 210 - 10, 20)
2323
$iHeight += 20
2424
Local $idBtnCancel = GUICtrlCreateButton("Cancel", $iWidth - 100, $iHeight, 100, 40)
2525
Local $idBtnDelete = GUICtrlCreateButton("Delete Selected", $iWidth - 210, $iHeight, 100, 40)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"Blacklist": [
3+
"electrician_simulator",
4+
"hitman_2_silent_assassin",
5+
"hitman_blood_money",
6+
"syberia_anniversary_collection",
7+
"hitman_contracts",
8+
"hitman_absolution",
9+
"fallout_4_game_of_the_year_edition",
10+
"summer_memories_deluxe_edition",
11+
"huniepop",
12+
"planescape_torment_enhanced_edition",
13+
"hitman_codename_47",
14+
"the_house_of_the_dead_remake",
15+
"cyberpunk_2077_phantom_liberty",
16+
"neverwinter_nights_enhanced_edition_digital_deluxe_edition",
17+
"god_of_war",
18+
"heroes_of_might_and_magic_4_complete"
19+
],
20+
"Owned": [
21+
"stalker_call_of_prypiat_enhanced_edition",
22+
"lords_of_the_fallen_game_of_the_year_edition",
23+
"assassins_creed_directors_cut",
24+
"heroes_of_might_and_magic_3_complete_edition",
25+
"postal_2"
26+
],
27+
"Watchlist": [
28+
"tomb_raider_iv_vi_remastered"
29+
]
30+
}

0 commit comments

Comments
 (0)