@@ -37,6 +37,8 @@ _MainGUI()
3737
3838; --------------------------------------------------------------------------------------------------------------------------------
3939Func _MainGUI() ; Creates the primary application window and starts the message loop
40+ ConsoleWrite (" ! MicrosoftEdgeWebview2 : version check: " & _NetWebView2_IsAlreadyInstalled() & ' ERR=' & @error & ' EXT=' & @extended & @CRLF )
41+
4042 ; Use $WS_CLIPCHILDREN to prevent flickering when resizing child windows
4143 $hMainGUI = GUICreate (" Multi-WebView2 v1.4.0" , 1000 , 600 , - 1 , - 1 , BitOR ($WS_OVERLAPPEDWINDOW , $WS_CLIPCHILDREN ))
4244
@@ -85,13 +87,13 @@ Func _MainGUI() ; Creates the primary application window and starts the message
8587 Case $Bar1 .GlobalNavButton
8688 MouseClick (" right" )
8789 Case $Bar1 .ctx_Google
88- If IsObj ($oWeb1 ) Then $oWeb1 .Navigate( " https://www.google.com" )
90+ If IsObj ($oWeb1 ) Then _NetWebView2_Navigate( $oWeb1 , " https://www.google.com" )
8991 Case $Bar1 .ctx_AutoIt
90- If IsObj ($oWeb1 ) Then $oWeb1 .Navigate( " https://www.autoitscript.com/forum" )
92+ If IsObj ($oWeb1 ) Then _NetWebView2_Navigate( $oWeb1 , " https://www.autoitscript.com/forum" )
9193 Case $Bar1 .ctx_Ghostery
92- If IsObj ($oWeb1 ) Then $oWeb1 .Navigate( " extension://mlomiejdfkolichcflejclcbmpeaniij/pages/panel/index.html" )
94+ If IsObj ($oWeb1 ) Then _NetWebView2_Navigate( $oWeb1 , " extension://mlomiejdfkolichcflejclcbmpeaniij/pages/panel/index.html" )
9395 Case $Bar1 .ctx_DarkReader
94- If IsObj ($oWeb1 ) Then $oWeb1 .Navigate( " extension://eimadpbcbfnmbkopoojfekhnkhdbieeh/ui/popup/index.html" )
96+ If IsObj ($oWeb1 ) Then _NetWebView2_Navigate( $oWeb1 , " extension://eimadpbcbfnmbkopoojfekhnkhdbieeh/ui/popup/index.html" )
9597 Case $Bar1 .ctx_Extensions_Manager
9698 _WV2_ShowExtensionPicker(500 , 600 , $hMainGUI , @ScriptDir & " \Extensions_Lib" , $Bar1 .Web_ProfilePath)
9799 Case $Bar1 .ctx_EnableCustomMenu
@@ -188,7 +190,7 @@ Func _InitBrowsers() ; Creates child window containers and initializes WebView2
188190 Sleep (10 )
189191 Until $oWeb1 .IsReady And $oWeb2 .IsReady
190192
191- $oWeb1 .Navigate( " https://www.google.com/search?q=web1" )
193+ _NetWebView2_Navigate( $oWeb1 , " https://www.google.com/search?q=web1" )
192194 GUISetState (@SW_SHOWNOACTIVATE , $hID1 )
193195
194196 $oWeb2 .Navigate(" https://www.google.com/search?q=web2" )
@@ -272,7 +274,7 @@ Func Bridge2_OnMessageReceived($sMsg) ; [Bridge2 JS]
272274 Local $sURL = " https://www.google.com/search?q=" & $sSearchText & " +site:" & $sDomain2
273275
274276 ; Update Browser 1 with the results
275- $oWeb1 .Navigate( $sURL )
277+ _NetWebView2_Navigate( $oWeb1 , $sURL )
276278 EndIf
277279 EndSwitch
278280EndFunc ; ==>Bridge2_OnMessageReceived
0 commit comments