Jump to content

mLipok

MVPs
  • Posts

    12,070
  • Joined

  • Last visited

  • Days Won

    70

mLipok last won the day on September 26

mLipok had the most liked content!

Profile Information

  • Member Title
    Sometimes... even usually I'm nitpicky.
  • Location
    Europe, Poland, Upper Silesia, Zabrze
  • Interests
    ¯\_(ツ)_/¯

Recent Profile Visitors

33,391 profile views

mLipok's Achievements

  1. Hi everyone, I’d like to share WebView2.au3, a native AutoIt UDF for embedding Microsoft Edge WebView2 in AutoIt GUI applications. The UDF talks to the Win32 WebView2 COM interfaces directly from AutoIt. It does not require a C#/.NET bridge, a registered ActiveX control, a WebDriver executable, or a separate browser automation server. What it can do Run with x86 or x64 AutoIt using the matching WebView2Loader.dll. Host multiple WebView2 instances and manage application-level tabs. Navigate to URLs or HTML content, execute JavaScript, and exchange messages between AutoIt and the page. Handle navigation events, title changes and new-window requests. Locate and interact with DOM elements using CSS selectors, XPath and other locator strategies. Wait for elements or script conditions, work with forms and tables, and access local or session storage. Capture screenshots and export PDF or MHTML to files or in-memory data. Use DevTools and selected Chrome DevTools Protocol features. Check the installed WebView2 Runtime and obtain diagnostic information through @error, @extended and configurable logging. For users of the standard AutoIt IE.au3 UDF The project includes IE.au3-style migration helpers for common tasks involving documents, forms, elements, links, images, tables and frames. They are intended to make existing AutoIt code easier to adapt to WebView2. These helpers operate on the modern Chromium-based WebView2 control; they do not create Internet Explorer COM objects or reproduce every behavior of the Internet Explorer engine. The repository documents the available mappings and differences. Requirements Windows with a compatible Microsoft Edge WebView2 Runtime; AutoIt 3.3.18.0 or newer recommended; a WebView2Loader.dll matching the AutoIt process architecture. The source code, installation instructions, API reference, examples and known limitations are here: https://github.com/mlipok/WebView2.au3-NativeAutoIt3-UDF Origins and acknowledgements This project grew out of the AutoIt Forum discussion about embedding WebView2, which I started in 2020. LarsJ demonstrated the native AutoIt techniques that form the technical foundation: loading WebView2Loader.dll, using COM interfaces through ObjCreateInterface(), defining interface tags and handling callbacks. Related callback and ObjectFromTag research by trancexx also informed the implementation. Dan Pollak (Danp2) and au3WebDriver inspired selected API, DOM automation and diagnostic patterns. Examples by Ioa747 from NetWebView2Lib provided the basis for a separately credited set of example adaptations. The migration layer also draws on the familiar conventions of AutoIt’s standard IE.au3 UDF. I develop and maintain the current native WebView2 UDF as mLipok. Thank you to these authors and the other AutoIt community contributors. Detailed attribution and third-party licenses are recorded in the repository’s NOTICE.md. Project status and support This is an early release. Static checks and selected x86/x64 runtime tests have been completed, but not every example or host application has been verified interactively. Please review the known limitations before using a feature in production. I welcome questions, suggestions, bug reports and examples of how you use the UDF. For a bug report, please include a minimal reproducing script, your AutoIt version and architecture, WebView2 Runtime version, and any @error, @extended or diagnostic output.
  2. I hit a problem in: Func __WinAPI_GetTcpTable() ;funkey 2012.12.14 ;https://www.autoitscript.com/forum/topic/146671-getextendedtcptable-get-netstat-information/?tab=comments#comment-1038649 Local Const $aConnState[12] = ["CLOSED", "LISTENING", "SYN_SENT", "SYN_RCVD", "ESTABLISHED", "FIN_WAIT1", _ "FIN_WAIT2", "CLOSE_WAIT", "CLOSING", "LAST_ACK", "TIME_WAIT", "DELETE_TCB"] Local $tMIB_TCPTABLE = DllStructCreate("dword[6]") Local $aRet = DllCall("Iphlpapi.dll", "DWORD", "GetTcpTable", "struct*", $tMIB_TCPTABLE, "DWORD*", 0, "BOOL", True) Local $dwSize = $aRet[2] $tMIB_TCPTABLE = DllStructCreate("DWORD[" & $dwSize / 4 & "]") $aRet = DllCall("Iphlpapi.dll", "DWORD", "GetTcpTable", "struct*", $tMIB_TCPTABLE, "DWORD*", $dwSize, "BOOL", True) If $aRet[0] <> 0 Then Return SetError(1) Local $iNumEntries = DllStructGetData($tMIB_TCPTABLE, 1, 1) Local $aRes[$iNumEntries][6] For $i = 0 To $iNumEntries - 1 $aRes[$i][0] = DllStructGetData($tMIB_TCPTABLE, 1, 2 + $i * 5 + 0) ConsoleWrite(@ScriptLineNumber & ' > ' & $aRes[$i][0] & @CRLF) $aRes[$i][1] = $aConnState[$aRes[$i][0] - 1] the $aRes[$i][0] in the console returns 0 I have and as so far I have such solution: For $i = 0 To $iNumEntries - 1 $aRes[$i][0] = DllStructGetData($tMIB_TCPTABLE, 1, 2 + $i * 5 + 0) Local $iConnState = $aRes[$i][0] If $iConnState >= 1 And $iConnState <= UBound($aConnState) Then $aRes[$i][1] = $aConnState[$iConnState - 1] Else ; Keep the row and its local port even when Windows reports an unknown state. $aRes[$i][1] = 'UNKNOWN (' & $iConnState & ')' EndIf what do you think about.
  3. Something similar that I have in the background. Thanks.
  4. to all interested in: https://github.com/WinMerge/winmerge/pull/3685
  5. There was some one ... I had a deperesion in the past few years so I stoped to be so nitpicky ... and became more friendly.
  6. btw. As I said: I was checking the lexer for WinMerge. Naturally (for me whent it comes with C++), I used AI (ChatGPT) for this and asked it to prepare some test .au3 scripts. Interestingly, I first discovered the bug in WinMerge, and only then did I compare it with SciTE.
  7. I do not need. People are simply prone to making mistakes, and a stray letter can easily end up in the code. for example: #comments-startcomment for the CS CE block of comment #cs Extra #ce Extra #comments-end Extra instead: #comments-start comment for the CS CE block of comment #cs Extra #ce Extra #comments-end Extra I thought everything was here:
  8. yeah I know: and yes I'm nitpicky ... usually.
  9. hmm... in this following case also Au3Check work not coherent with AutoIt3.exe If True Then ConsoleWrite(1 & @CRLF) #csExtra3 If True Then ConsoleWrite(2 & @CRLF) dfadfafdadf #ceExtra3 If True Then ConsoleWrite(3 & @CRLF) Au3Check results: AutoIt3.exe results:
  10. also tidy works kinda weired: before TIDY: #csExtra1 ConsoleWrite('First test' & @CRLF) #ceExtra1 #Region Rozpoznaje dyrektywy komentarzy bez względu na wielkość liter i sprawdza granicę ich nazw. ; Regression: mixed case is valid; longer names below must NOT close or open blocks. #CoMmEnTs-StArT #csExtra2 #ceExtra2 #comments-endless If True Then ConsoleWrite("Still a comment after prefix lookalikes." & @CRLF) EndIf #CoMmEnTs-EnD Global $afterMixedCaseDirective = 2 #EndRegion Rozpoznaje dyrektywy komentarzy bez względu na wielkość liter i sprawdza granicę ich nazw. after TIDY: #csExtra1 ConsoleWrite('First test' & @CRLF) #ceExtra1 #Region Rozpoznaje dyrektywy komentarzy bez względu na wielkość liter i sprawdza granicę ich nazw. ; Regression: mixed case is valid; longer names below must NOT close or open blocks. #CoMmEnTs-StArT #csExtra2 #ceExtra2 #comments-end Extra2 If True Then ConsoleWrite("Still a comment after prefix lookalikes." & @CRLF) EndIf #CoMmEnTs-EnD Extra2 Global $afterMixedCaseDirective = 2 #EndRegion Rozpoznaje dyrektywy komentarzy bez względu na wielkość liter i sprawdza granicę ich nazw. I mean: change #comments-endless into: #comments-end  Extra2
  11. currently I work on: https://github.com/WinMerge/winmerge/pull/3685 and I notice that this snippets seams to be wrongly highlighted: #csExtra ConsoleWrite('First test' & @CRLF) #ceExtra #Region Rozpoznaje dyrektywy komentarzy bez względu na wielkość liter i sprawdza granicę ich nazw. ; Regression: mixed case is valid; longer names below must NOT close or open blocks. #CoMmEnTs-StArT #csExtra #ceExtra #comments-endless If True Then ConsoleWrite("Still a comment after prefix lookalikes." & @CRLF) EndIf #CoMmEnTs-EnD Global $afterMixedCaseDirective = 2 #EndRegion Rozpoznaje dyrektywy komentarzy bez względu na wielkość liter i sprawdza granicę ich nazw. by SciTE4Au3 I mean line #1 open comment block and line #3 end comment block also line #10 ends comments blocks but Lexer does'nt change the coloring properly as a AutoIt3.exe restults I get: Which means first ConsoleWrite is ommited and second ConsoleWrite is executed, which you wouldn't expect from code visualization in SciTE.
  12. What you mean here ?
  13. It shouldn't. It would be a different story if you removed `sleep()` entirely.
  14. Why sleep(100) ? put there 10.
×
×
  • Create New...