From 21f7ce222f1c9f48eb3e23d2eef6a9b8e6a6524d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Lipok?= <11089482+mlipok@users.noreply.github.com> Date: Mon, 23 Feb 2026 22:24:13 +0100 Subject: [PATCH 1/9] Examples - update after Alpha 2.1.0 --- examples/000-NetJson.Parser.au3 | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/000-NetJson.Parser.au3 b/examples/000-NetJson.Parser.au3 index 2289bd3..884aad1 100644 --- a/examples/000-NetJson.Parser.au3 +++ b/examples/000-NetJson.Parser.au3 @@ -15,6 +15,7 @@ _Example() Exit Func _Example() + ConsoleWrite("! MicrosoftEdgeWebview2 : version check: " & _NetWebView2_IsAlreadyInstalled() & ' ERR=' & @error & ' EXT=' & @extended & @CRLF) ConsoleWrite(@CRLF & "=== STARTING NETJSON TUTORIAL ===" & @CRLF) #Region ; 0. Initialize the COM Object From cf129ab50e469f762143f5a5f99a6b51be3b3cb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Lipok?= <11089482+mlipok@users.noreply.github.com> Date: Mon, 23 Feb 2026 22:26:08 +0100 Subject: [PATCH 2/9] Update 001-BasicDemo.au3 --- examples/001-BasicDemo.au3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/001-BasicDemo.au3 b/examples/001-BasicDemo.au3 index 5314083..3fe48b0 100644 --- a/examples/001-BasicDemo.au3 +++ b/examples/001-BasicDemo.au3 @@ -108,7 +108,7 @@ Func _BridgeMyEventsHandler_OnMessageReceived($oWebV2M, $hGUI, $sMessage) If $sMessage = "CLOSE_APP" Then If MsgBox(36, "Confirm", "Exit Application?", 0, $hGUI) = 6 Then Exit Else - MsgBox(64, "JS Notification", "Message from Browser: " & $sMessage) + MsgBox($MB_ICONINFORMATION, "JS Notification", "Message from Browser: " & $sMessage) $iMsgCnt += 1 UpdateWebUI($oWebV2M, "mainTitle", $iMsgCnt & " Hello from AutoIt!") EndIf From 4caa6f1b6f555c9eaca6fd1c91ca4cfdd9d789ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Lipok?= <11089482+mlipok@users.noreply.github.com> Date: Mon, 23 Feb 2026 22:27:16 +0100 Subject: [PATCH 3/9] Update 009-Auditor.au3 --- examples/009-Auditor.au3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/009-Auditor.au3 b/examples/009-Auditor.au3 index 34ad726..8a3f3aa 100644 --- a/examples/009-Auditor.au3 +++ b/examples/009-Auditor.au3 @@ -140,7 +140,7 @@ Func _Example() ; WebView2 Setup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ; Initialize WebView2 Manager and register events - Local $oWebV2M = _NetWebView2_CreateManager("", "WebView_", "") + Local $oWebV2M = _NetWebView2_CreateManager("", "WebView_", "", False) If @error Then Exit ConsoleWrite("@@(" & @ScriptLineNumber & ") :: @error:" & @error & ", @extended:" & @extended & @CRLF) ; create JavaScript Bridge object @@ -311,7 +311,7 @@ Func _WebView_OnMessageReceived($oWebV2M, $hGUI, $sMessage) EndIf Case "PDF_SUCCESS" - MsgBox(64, "Success", "PDF Report saved successfully!") + MsgBox($MB_ICONINFORMATION, "Success", "PDF Report saved successfully!") Case "PDF_ERROR" MsgBox(16, "Error", "PDF Export failed: " & $sMessage) From dddbf13e7880634cfeb3851e52692e2c4d0ff67d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Lipok?= <11089482+mlipok@users.noreply.github.com> Date: Mon, 23 Feb 2026 22:27:54 +0100 Subject: [PATCH 4/9] Update 012-GetCookies.au3 --- examples/012-GetCookies.au3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/012-GetCookies.au3 b/examples/012-GetCookies.au3 index d40d56c..54e1e2f 100644 --- a/examples/012-GetCookies.au3 +++ b/examples/012-GetCookies.au3 @@ -247,7 +247,7 @@ Func WebView_OnMessageReceived($sMessage) EndIf Case "PDF_SUCCESS" - MsgBox(64, "Success", "PDF Report saved successfully!") + MsgBox($MB_ICONINFORMATION, "Success", "PDF Report saved successfully!") Case "ERROR", "NAV_ERROR" From 3c15044af97daedcc9ecf8c0ac65d2577304f667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Lipok?= <11089482+mlipok@users.noreply.github.com> Date: Mon, 23 Feb 2026 22:29:01 +0100 Subject: [PATCH 5/9] Update 014-pdfJS-Static_PDF_Viewer.au3 --- examples/014-pdfJS-Static_PDF_Viewer.au3 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/examples/014-pdfJS-Static_PDF_Viewer.au3 b/examples/014-pdfJS-Static_PDF_Viewer.au3 index b0f1e32..0a33f5e 100644 --- a/examples/014-pdfJS-Static_PDF_Viewer.au3 +++ b/examples/014-pdfJS-Static_PDF_Viewer.au3 @@ -41,7 +41,7 @@ Func _Example() ; initialize browser - put it on the GUI Local $sProfileDirectory = @ScriptDir & "\NetWebView2Lib-UserDataFolder" - _NetWebView2_Initialize($oWeb, $hGUI, $sProfileDirectory, 0, 0, 0, 0, True, False, False, 0.7) + _NetWebView2_Initialize($oWeb, $hGUI, $sProfileDirectory, 0, 0, 0, 0, True, True, 0.7) ; Get the bridge object and register events Local $oBridge = _NetWebView2_GetBridge($oWeb, "__UserEventHandler__Bridge_") @@ -130,6 +130,17 @@ Func _Example() _NetWebView2_ExecuteScript($oWeb, $s_JavaScript_snipp, $NETWEBVIEW2_EXECUTEJS_MODE0_FIREANDFORGET) MsgBox($MB_TOPMOST, "TEST #" & @ScriptLineNumber, "After:" & @CRLF & $s_JavaScript_snipp) + $s_JavaScript_snipp = 'PDFViewerApplication.open({ url: "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" });' + _NetWebView2_ExecuteScript($oWeb, $s_JavaScript_snipp, $NETWEBVIEW2_EXECUTEJS_MODE0_FIREANDFORGET) + MsgBox($MB_TOPMOST, "TEST #" & @ScriptLineNumber, "After:" & @CRLF & $s_JavaScript_snipp) + +;~ $s_JavaScript_snipp = FileRead(@ScriptDir & '\JS_Lib\PDFViewerApplicationEvents.js') +;~ _NetWebView2_ExecuteScript($oWeb, $s_JavaScript_snipp, $NETWEBVIEW2_EXECUTEJS_MODE2_RESULT) + + $s_JavaScript_snipp = 'PDFViewerApplication.open({ url: "https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf" });' + _NetWebView2_ExecuteScript($oWeb, $s_JavaScript_snipp, $NETWEBVIEW2_EXECUTEJS_MODE0_FIREANDFORGET) + MsgBox($MB_TOPMOST, "TEST #" & @ScriptLineNumber, "After:" & @CRLF & $s_JavaScript_snipp) + #EndRegion ; now we can call the script directly from the JavaScript library "NetWebView2Lib_pdfjs_Tools.js" - some pdfjs magic stuff ;) ; Main Loop From 4614ef489ab6040653f686b009607254c64512bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Lipok?= <11089482+mlipok@users.noreply.github.com> Date: Mon, 23 Feb 2026 22:29:36 +0100 Subject: [PATCH 6/9] Update 017-MappedFolder.au3 --- examples/017-MappedFolder.au3 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/017-MappedFolder.au3 b/examples/017-MappedFolder.au3 index 09e8b3a..fc927db 100644 --- a/examples/017-MappedFolder.au3 +++ b/examples/017-MappedFolder.au3 @@ -13,6 +13,8 @@ _Example() Func _Example() + ConsoleWrite("! MicrosoftEdgeWebview2 : version check: " & _NetWebView2_IsAlreadyInstalled() & ' ERR=' & @error & ' EXT=' & @extended & @CRLF) + Local $oMyError = ObjEvent("AutoIt.Error", __NetWebView2_COMErrFunc) #forceref $oMyError From 75ad0897d6ea77e2f75d6fffcf722f1fb7307769 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Lipok?= <11089482+mlipok@users.noreply.github.com> Date: Mon, 23 Feb 2026 22:34:53 +0100 Subject: [PATCH 7/9] Update NetWebView2Lib.au3 --- NetWebView2Lib.au3 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/NetWebView2Lib.au3 b/NetWebView2Lib.au3 index 8fee755..fbce92b 100644 --- a/NetWebView2Lib.au3 +++ b/NetWebView2Lib.au3 @@ -181,7 +181,7 @@ EndFunc ;==>_NetWebView2_CreateManager ; $i_ZoomFactor - [optional] an integer value. Default is 1.0. ; $s_BackColor - [optional] a string value. Default is "0x2B2B2B". ; $b_InitConsole - [optional] a boolean value. Default is False. -; Return values .: None +; Return values .: $iInit ; Author ........: mLipok, ioa747 ; Modified ......: ; Remarks .......: @@ -221,7 +221,7 @@ Func _NetWebView2_Initialize($oWebV2M, $hUserGUI, $s_ProfileDirectory, $i_Left = EndIf If TimerDiff($hTimer) >= $iTimeOut_ms Then Return SetError(1, 0, '') Until $oWebV2M.IsReady Or $iMessage = $NETWEBVIEW2_MESSAGE__INIT_READY - If Not __NetWebView2_WaitForReadyState($oWebV2M, $hTimer, $iTimeOut_ms) Then Return SetError(2, 0, '') +;~ If Not __NetWebView2_WaitForReadyState($oWebV2M, $hTimer, $iTimeOut_ms) Then Return SetError(2, 0, '') #EndRegion ; After Initialization wait for the engine to be ready before navigating ; WebView2 Configuration @@ -235,7 +235,7 @@ Func _NetWebView2_Initialize($oWebV2M, $hUserGUI, $s_ProfileDirectory, $i_Left = EndIf If @error Then __NetWebView2_Log(@ScriptLineNumber, $s_Prefix & " !!! Manager Creation ERROR", 1) - Return SetError(@error, $oWebV2M.GetBrowserProcessId(), '') + Return SetError(@error, $oWebV2M.GetBrowserProcessId(), $iInit) EndFunc ;==>_NetWebView2_Initialize ; #INTERNAL_USE_ONLY# =========================================================================================================== @@ -2353,3 +2353,4 @@ EndFunc ;==>__NetWebView2_Events__OnFrameWebMessageReceived #EndRegion ; === NetWebView2Lib UDF === EVENT HANDLERS * #TODO === #EndRegion ; === NetWebView2Lib UDF === EVENT HANDLERS === + From 8be94531155567f5885373a2693142ba4cc15b2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Lipok?= <11089482+mlipok@users.noreply.github.com> Date: Mon, 23 Feb 2026 23:37:18 +0100 Subject: [PATCH 8/9] Update 018-BasicFramesDemo.au3 --- examples/018-BasicFramesDemo.au3 | 133 ++++++++++++++++--------------- 1 file changed, 68 insertions(+), 65 deletions(-) diff --git a/examples/018-BasicFramesDemo.au3 b/examples/018-BasicFramesDemo.au3 index 50e2014..16d26cf 100644 --- a/examples/018-BasicFramesDemo.au3 +++ b/examples/018-BasicFramesDemo.au3 @@ -52,12 +52,12 @@ Func Main() #Region - Testing how to manage frames _NetWebView2_Navigate($oWebV2M, 'https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_iframe', $NETWEBVIEW2_MESSAGE__TITLE_CHANGED, "", 5000) - MsgBox($MB_TOPMOST, "TEST #" & @ScriptLineNumber, 1) + MsgBox($MB_TOPMOST, "TEST #" & @ScriptLineNumber, 'Wait till all frames are loaded') ;~ _Demo_NavigateCheckBanner($sSession, "https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_iframe", '//*[@id="snigel-cmp-framework" and @class="snigel-cmp-framework"]') If @error Then Return SetError(@error, @extended) - #Region ; Example part 1 - testing NetWebView2Lib new methodes: .GetFrameCount() .GetFrameUrl($IDX_Frame) .GetFrameName($IDX_Frame) - ConsoleWrite("+ Example part 1 - testing NetWebView2Lib new methodes: .GetFrameCount() .GetFrameUrl($IDX_Frame) .GetFrameName($IDX_Frame)" & @CRLF) + #Region ; Example part 1 - testing NetWebView2Lib methodes: .GetFrameCount() .GetFrameUrl($IDX_Frame) .GetFrameName($IDX_Frame) + ConsoleWrite("+ Example part 1 - testing NetWebView2Lib methodes: .GetFrameCount() .GetFrameUrl($IDX_Frame) .GetFrameName($IDX_Frame)" & @CRLF) Local $iFrameCount = $oWebV2M.GetFrameCount() ConsoleWrite(@CRLF) @@ -68,17 +68,19 @@ Func Main() ConsoleWrite("- NAME=" & $oWebV2M.GetFrameName($IDX_Frame) & @CRLF) ConsoleWrite(@CRLF) Next - #EndRegion ; Example part 1 - testing NetWebView2Lib new methodes: .GetFrameCount() .GetFrameUrl($IDX_Frame) .GetFrameName($IDX_Frame) + MsgBox($MB_TOPMOST, "TEST #" & @ScriptLineNumber, 'Example part 1 - testing NetWebView2Lib methodes: ' & @CRLF & '.GetFrameCount() .GetFrameUrl($IDX_Frame) .GetFrameName($IDX_Frame)' & @CRLF & 'End') + #EndRegion ; Example part 1 - testing NetWebView2Lib methodes: .GetFrameCount() .GetFrameUrl($IDX_Frame) .GetFrameName($IDX_Frame) - #Region ; Example part 2 - testing NetWebView2Lib new methodes: .GetFrameCount() .GetFrameUrl($IDX_Frame) .GetFrameName($IDX_Frame) - ConsoleWrite("+ Example part 2 - testing NetWebView2Lib new methodes: .GetFrameCount() .GetFrameUrl($IDX_Frame) .GetFrameName($IDX_Frame)" & @CRLF) + #Region ; Example part 2 - testing NetWebView2Lib methodes: .GetFrameCount() .GetFrameUrl($IDX_Frame) .GetFrameName($IDX_Frame) + ConsoleWrite("+ Example part 2 - testing NetWebView2Lib methodes: .GetFrameCount() .GetFrameUrl($IDX_Frame) .GetFrameName($IDX_Frame)" & @CRLF) ConsoleWrite("! " & @ScriptLineNumber & " : GetFrameUrls() :" & @CRLF & $oWebV2M.GetFrameUrls() & @CRLF) ConsoleWrite("! " & @ScriptLineNumber & " : GetFrameNames() :" & @CRLF & $oWebV2M.GetFrameNames() & @CRLF) - #EndRegion ; Example part 2 - testing NetWebView2Lib new methodes: .GetFrameCount() .GetFrameUrl($IDX_Frame) .GetFrameName($IDX_Frame) + MsgBox($MB_TOPMOST, "TEST #" & @ScriptLineNumber, 'Example part 2 - testing NetWebView2Lib methodes:' & @CRLF & '.GetFrameCount() .GetFrameUrl($IDX_Frame) .GetFrameName($IDX_Frame)' & @CRLF & 'End') + #EndRegion ; Example part 2 - testing NetWebView2Lib methodes: .GetFrameCount() .GetFrameUrl($IDX_Frame) .GetFrameName($IDX_Frame) - #Region ; Example part 3 - testing NetWebView2Lib new methodes .GetFrameHtmlSource($IDX_Frame) - ConsoleWrite("+ Example part 3 - testing NetWebView2Lib new methodes .GetFrameHtmlSource($IDX_Frame)" & @CRLF) + #Region ; Example part 3 - testing NetWebView2Lib methodes .GetFrameHtmlSource($IDX_Frame) + ConsoleWrite("+ Example part 3 - testing NetWebView2Lib methodes .GetFrameHtmlSource($IDX_Frame)" & @CRLF) For $IDX_Frame = 0 To $iFrameCount - 1 ConsoleWrite(@CRLF & "======================================================" & @CRLF) Local $sHtmlSource = Fire_And_Wait($oWebV2M.GetFrameHtmlSource($IDX_Frame), 5000) ; pair with "FRAME_HTML_SOURCE" @@ -87,8 +89,8 @@ Func Main() ConsoleWrite(@CRLF & "======================================================" & @CRLF) ConsoleWrite(@CRLF) ConsoleWrite(@CRLF) - #EndRegion ; Example part 3 - testing NetWebView2Lib new methodes .GetFrameHtmlSource($IDX_Frame) - + MsgBox($MB_TOPMOST, "TEST #" & @ScriptLineNumber, 'Example part 3 - testing NetWebView2Lib methodes : ' & @CRLF & '.GetFrameHtmlSource($IDX_Frame)' & @CRLF & 'End') + #EndRegion ; Example part 3 - testing NetWebView2Lib methodes .GetFrameHtmlSource($IDX_Frame) #Region ; Example part 4 - Direct Frame Interaction @@ -106,6 +108,8 @@ Func Main() ConsoleWrite("VarGetType($oFrame0)=" & VarGetType($oFrame0) & @CRLF) ConsoleWrite("$oFrame0.Name=" & $oFrame0.Name & @CRLF & @CRLF) + ConsoleWrite("$oFrame0.FrameId=" & $oFrame0.FrameId & @CRLF & @CRLF) + ConsoleWrite("$oFrame0.IsDestroyed()=" & $oFrame0.IsDestroyed() & @CRLF & @CRLF) ; Direct script execution in the iframe without involving the central Manager $oFrame0.ExecuteScript("document.body.style.backgroundColor = 'red';") @@ -118,12 +122,19 @@ Func Main() Else ConsoleWrite("! Error: $oFrame0 is not a valid COM Object" & @CRLF) EndIf - + MsgBox($MB_TOPMOST, "TEST #" & @ScriptLineNumber, 'Example part 4 - Direct Frame Interaction: ' & @CRLF & '' & @CRLF & 'End') #EndRegion ; Example part 4 - Direct Frame Interaction + #Region ; Example part 5 - Get all Frames as array + Local $aFrames + Do + $aFrames = _NetWebView2_GetAllFrames_AsArray($oWebV2M) + _ArrayDisplay($aFrames, @ScriptLineNumber & ' $aFrames : Example part 5 - Get all Frames as array') + Until ($IDNO = MsgBox($MB_YESNO + $MB_TOPMOST + $MB_ICONQUESTION + $MB_DEFBUTTON2, "Question", "Check again all frames ?")) - #EndRegion - Testing how to manage frames + #EndRegion ; Example part 5 - Get all Frames as array + #EndRegion - Testing how to manage frames ; Main Loop While 1 @@ -135,46 +146,58 @@ Func Main() GUIDelete($hGUI) - _NetWebView2_CleanUp($oWebV2M, $oJSBridge) EndFunc ;==>Main -; ============================================================================== -; ; Function to update a text element inside the WebView UI -; ============================================================================== -Func UpdateWebUI($oWebV2M, $sElementId, $sNewText) - If Not IsObj($oWebV2M) Then Return '' - - ; Escape backslashes, single quotes and handle new lines for JavaScript safety - Local $sCleanText = StringReplace($sNewText, "\", "\\") - $sCleanText = StringReplace($sCleanText, "'", "\'") - $sCleanText = StringReplace($sCleanText, @CRLF, "\n") - $sCleanText = StringReplace($sCleanText, @LF, "\n") - - Local $sJavaScript = "document.getElementById('" & $sElementId & "').innerText = '" & $sCleanText & "';" - _NetWebView2_ExecuteScript($oWebV2M, $sJavaScript) -EndFunc ;==>UpdateWebUI - -; ============================================================================== -; MY EVENT HANDLER: Bridge (JavaScript Messages) -; ============================================================================== -Func _BridgeMyEventsHandler_OnMessageReceived($oWebV2M, $hGUI, $sMessage) - Local Static $iMsgCnt = 0 +; #FUNCTION# ==================================================================================================================== +; Name ..........: _NetWebView2_GetAllFrames_AsArray +; Description ...: Get all Frames as array +; Syntax ........: _NetWebView2_GetAllFrames_AsArray($oWebV2M) +; Parameters ....: $oWebV2M - an object. +; Return values .: None +; Author ........: mLipok +; Modified ......: +; Remarks .......: +; Related .......: +; Link ..........: +; Example .......: No +; =============================================================================================================================== +Func _NetWebView2_GetAllFrames_AsArray($oWebV2M) + Local Const $s_Prefix = "[_NetWebView2_GetAllFrames_AsArray]:" + Local $oMyError = ObjEvent("AutoIt.Error", __NetWebView2_COMErrFunc) ; Local COM Error Handler + #forceref $oMyError, $s_Prefix + + Local Enum _ + $FRAME_IDX, _ + $FRAME_OBJECT, _ + $FRAME_ID, _ + $FRAME_NAME, _ + $FRAME_URL, _ + $FRAME_DESTROYED, _ + $FRAME_HTML, _ + $FRAME__COUNTER - If $sMessage = "CLOSE_APP" Then - If MsgBox(36, "Confirm", "Exit Application?", 0, $hGUI) = 6 Then Exit - Else - MsgBox(64, "JS Notification", "Message from Browser: " & $sMessage) - $iMsgCnt += 1 - UpdateWebUI($oWebV2M, "mainTitle", $iMsgCnt & " Hello from AutoIt!") - EndIf -EndFunc ;==>_BridgeMyEventsHandler_OnMessageReceived + Local $iFrameCount = $oWebV2M.GetFrameCount() + Local $aFrames[$iFrameCount][$FRAME__COUNTER] + Local $oFrame + For $IDX_Frame = 0 To $iFrameCount - 1 + $oFrame = $oWebV2M.GetFrame($IDX_Frame) + $aFrames[$IDX_Frame][$FRAME_IDX] = $IDX_Frame + $aFrames[$IDX_Frame][$FRAME_OBJECT] = $oFrame + $aFrames[$IDX_Frame][$FRAME_ID] = $oFrame.FrameId + $aFrames[$IDX_Frame][$FRAME_NAME] = $oWebV2M.Name + $aFrames[$IDX_Frame][$FRAME_URL] = $oWebV2M.GetFrameUrl($IDX_Frame) + $aFrames[$IDX_Frame][$FRAME_DESTROYED] = $oFrame.IsDestroyed() + $aFrames[$IDX_Frame][$FRAME_HTML] = $oWebV2M.GetFrameHtmlSource($IDX_Frame) + Next + Return $aFrames +EndFunc ;==>_NetWebView2_GetAllFrames_AsArray ; ============================================================================== ; MyHook_ Events ; ============================================================================== Func MyHook_OnMessageReceived($oWebV2M, $hGUI, $sMsg) - #forceref $oWebV2M, $hGUI, $sMsg + #forceref $oWebV2M, $hGUI ConsoleWrite("> [MyHook] OnMessageReceived: GUI:" & $hGUI & " Msg: " & (StringLen($sMsg) > 30 ? StringLeft($sMsg, 30) & "..." : $sMsg) & @CRLF) Local $iSplitPos = StringInStr($sMsg, "|") Local $sCommand = $iSplitPos ? StringStripWS(StringLeft($sMsg, $iSplitPos - 1), 3) : $sMsg @@ -194,27 +217,6 @@ Func MyHook_OnMessageReceived($oWebV2M, $hGUI, $sMsg) EndSwitch EndFunc ;==>MyHook_OnMessageReceived -; ============================================================================== -; HELPER: Demo HTML Content -; ============================================================================== -Func __GetDemoHTML() - Local $sH = _ - '
' & _ - 'The communication is now 100% Event-Driven (No Sleep needed).
' & _ - ' ' & _ - ' ' & _ - '