Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/08/2025 in all areas

  1. ... a little digression from the OP Browsing the internet I came across this interesting page (https://freeware.ordoconcept.net/OrdoWebview2.php) where there is an ocx through which it should be possible to use WebView2. Actually it refers to VB6, but maybe it can be adapted here too? To test it I installed OrdoWebView2 SDK (https://freeware.ordoconcept.net/download.php?file=OrdoWebView2ActiveXControl.2.0.9.exe). I then tried to use it through this simple script which is an adaptation of a similar script by @ptrex taken from this link, but I receive an error from the ocx: "Run-time error '0'"; the methods are not executed and not even the browser is incorporated into the GUI. Does anyone know how and if it is possible to make it work here? thanks. #AutoIt3Wrapper_UseX64=N #include <GUIConstantsEx.au3> ; Initialize COM error handler $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") ; Load ActiveX module $hActiveX = DllOpen("C:\Windows\SysWOW64\OrdoWebView2.ocx") ; Object identifiers Global Const $sCLSID = "{56335193-C129-41AC-B94A-B26B9B7469CF}" ; retrieved from the registry Global Const $sIID = Default ; Create a simple GUI for our output Local $hWebView2 = GUICreate("WebView2 ocx test", 1000, 580, (@DesktopWidth - 1000) / 2, (@DesktopHeight - 580) / 2) GUISetState(@SW_SHOW) ;Show GUI ; Create Com Object ; Local $oWebView2 = ObjCreate("OrdoWebView2.OrdoWebView") ; HEXEDIT.HexEditCtrl.1") Local $oWebView2 = ObjCreate($sCLSID, $sIID, $hActiveX) If IsObj($oWebView2) Then MsgBox(64, "Object's info", _ "Name of Object is:...." & ObjName($oWebView2, 1) & @CRLF & _ "Description string is:.........." & ObjName($oWebView2, 2) & @CRLF & _ "ProgID is:......................" & ObjName($oWebView2, 3) & @CRLF & _ "File associated in Registry is:." & ObjName($oWebView2, 4) & @CRLF & _ "Module name in which runs is:..." & ObjName($oWebView2, 5) & @CRLF & _ "CLSID of object's coclass is:..." & ObjName($oWebView2, 6) & @CRLF & _ "IID of object's interface is:..." & ObjName($oWebView2, 7)) Else Exit MsgBox(16, '', "Error occurred") EndIf ; https://freeware.ordoconcept.net/Help/OrdoWebView2/ $oWebView2.Anchor = True $oWebView2.HomeURL = "https://www.google.com/" $oWebView2.SearchEngine = 'Google' $oWebView2.Init $GUIActiveX = GUICtrlCreateObj($oWebView2, 10, 10, ((@DesktopWidth - 1000) / 2) - 20, ((@DesktopHeight - 580) / 2)) - 20) ; GUICtrlSetResizing($GUIActiveX, $GUI_DOCKAUTO) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd ; COM Error Handler Func MyErrFunc() $HexNumber = Hex($oMyError.number, 8) MsgBox(0, "AutoItCOM", "We intercepted a COM Error !" & @CRLF & @CRLF & _ "err.description is: " & @TAB & $oMyError.description & @CRLF & _ "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _ "err.number is: " & @TAB & $HexNumber & @CRLF & _ "err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _ "err.source is: " & @TAB & $oMyError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oMyError.helpcontext) SetError(1) EndFunc ;==>MyErrFunc
    1 point
  2. KaFu

    RichEdit issue ?

    Try _GUICtrlRichEdit_SetSel($hRichEdit, 0, 0).
    1 point
  3. Well, you got also my attention on it. It seems very promising, so I started to learn/code about it. I hope you do not mind, but I started a collaboration thread about this. If you should participate, it would be awesome. That way we could get faster and have greater result. Hope to see you there.
    1 point
  4. pixelsearch

    RichEdit issue ?

    What a great forum with people answering so quickly, thank you guys I found this annoyance yesterday while testing thoroughly my script here, then confirmed with Nine's script found there (example 3) . As both of our scripts don't use (on purpose) a $WS_VSCROLL style while creating the richedit control, then I started the actual thread with a richedit control that uses a $WS_VSCROLL style (as it should be) and here we are... If not mistaken, this annoyance happens only when the number of total lines = number total visible lines + 1 . We can confirm it like this, using the script above : 1) Let's keep these 2 lines of code untouched, ordered like this : _GUICtrlRichEdit_SetScrollPos($hRichEdit, 0, 0) ; bad behavior when placed before GUISetState (in case total lines = total visible + 1) GUISetState(@SW_SHOW) 2) Now we increase the value in this line... If _GUICtrlRichEdit_GetNumberOfFirstVisibleLine($hRichEdit) > 1 Then ExitLoop ... by changing its "> 1" to bigger values (like > 2 , > 3 etc...) How is the display ? Well it's always correct starting from > 2 ("correct" means line 1 is visible at top) , the only value that brings a bad display is "> 1" (bad display means line 2 is visible at top) So in the end, where should be placed the following line, before or after GUISetState() ? _GUICtrlRichEdit_SetScrollPos($hRichEdit, 0, 0) My advice is it should always be placed after, because even with 10.000 lines in the richedit control, the display is immediate (not in "2 times", tested) and who knows (it may happen one day) in case the richedit control got exactly a total number of lines = total visible lines + 1 , then its display will always be correct (e.g. line 1 appearing at the top)
    1 point
  5. BigDaddyO

    RichEdit issue ?

    Same, it doesn't seem to work before displaying the UI. It doesn't set @error either.
    1 point
  6. argumentum

    RichEdit issue ?

    yes, same here.
    1 point
  7. Yeah, so loading media in should work the same, I just never managed to work out how to actually render the video. (If you open an mp4 you should be able to hear the audio just fine) I'll need to have fresh look at this - I kinda just ran out of steam last time... The other thing that's peaked my interest is MediaFoundation. This is the replacement for DirectShow, which is essentially a low-level player. So the benefit here is we can sidestep WinRT/UWP entirely, but presumably the cost will be manually coding things that the WinRT object "just does". Either way I'll need to throw a bunch of time at it 🙂 which is fine, but it could be a couple of weeks before I have anything definitive sorry.
    1 point
  8. Just uploaded SciTEx86.zip & SciTEx64.zip which contain the Latest SciTE 5.5.6 versions released April 2, 2025, for those that like to use the latest version of SciTE Full. This will also be part of the final update of SciTE4AutoIt3.
    1 point
×
×
  • Create New...