@@ -32,6 +32,7 @@ Func _Main()
3232 ConsoleWrite (" ! BrowserWindowHandle = " & $oWeb_2 .BrowserWindowHandle & @CRLF )
3333 _NetWebView2_NavigateToString($oWeb_2 , _GetDemoHTML(" Browser 2 Content" ))
3434
35+ __Example_Log(@ScriptLineNumber , " END - close window to exit" & @CRLF )
3536 ; --- Main Loop ---
3637 While 1
3738 Switch GUIGetMsg ()
@@ -99,7 +100,7 @@ Func __UserEventHandler_Web1__Bridge__OnMessageReceived($oWebView, $hWindow, $sM
99100 $iMsgCnt += 1
100101 _UpdateWebUI($oWebView , " mainTitle" , " Counter: " & $iMsgCnt )
101102 _UpdateWebUI($oWebView , " statusMsg" , " Last Message: " & $sMsg )
102- If $sMsg = " PING" Then
103+ If $sMsg = " PING" Then ; intentional flickering to show that Web1 work differently than Web2
103104 GUISetState (@SW_HIDE , $hWindow )
104105 Sleep (200 )
105106 GUISetState (@SW_SHOW , $hWindow )
@@ -140,3 +141,9 @@ Func __UserEventHandler_Web2__Bridge__OnMessageReceived($oWebView, $hWindow, $sM
140141 EndIf
141142EndFunc ; ==>__UserEventHandler_Web2__Bridge__OnMessageReceived
142143#EndRegion ; USER DEFINED EVENTS HANDLER FUNCTION
144+
145+ Func __Example_Log($s_ScriptLineNumber , $sString , $iError = @error , $iExtended = @extended )
146+ ConsoleWrite (@ScriptName & ' SLN=' & $s_ScriptLineNumber & ' [' & $iError & ' /' & $iExtended & ' ] ::: ' & $sString & @CRLF )
147+ Return SetError ($iError , $iExtended , ' ' )
148+ EndFunc ; ==>__Example_Log
149+
0 commit comments