IronFine Posted 9 hours ago Posted 9 hours ago Hello, I am aware that there have been some discussions (e.g. https://www.autoitscript.com/trac/autoit/ticket/3864) around this issue. I ran into while testing several regular expression and while I could narrow it down easily, I was wondering if it possible to get the an error handler to "catch" that error, but I guess not, or? expandcollapse popupGlobal $oMyError = ObjEvent("AutoIt.Error", "ErrFunc") ; This is a custom error handler Func ErrFunc($oError) Local $bHexNumber = Hex($oError.number, 8) ConsoleWrite(@CRLF & @CRLF & "We intercepted a COM Error ! " & _ " Number: 0x " & Hex($oError.number, 8) & @CRLF & _ "Description: " & $oError.windescription & _ "At line: " & $oError.scriptline & @CRLF & @CRLF & _ "@AutoItVersion = " & @AutoItVersion & @CRLF & _ "@AutoItX64 = " & @AutoItX64 & @CRLF & _ "@Compiled = " & @Compiled & @CRLF & _ "@OSArch = " & @OSArch & @CRLF & _ "@OSVersion = " & @OSVersion & @CRLF & _ "Scriptline = " & $oError.scriptline & @CRLF & _ "NumberHex = " & $bHexNumber & @CRLF & _ "Number = " & $oError.number & @CRLF & _ "WinDescription = " & StringStripWS($oError.WinDescription, 2) & @CRLF & _ "Description = " & StringStripWS($oError.Description, 2) & @CRLF & _ "Source = " & $oError.Source & @CRLF & _ "HelpFile = " & $oError.HelpFile & @CRLF & _ "HelpContext = " & $oError.HelpContext & @CRLF & _ "LastDllError = " & $oError.LastDllError & @CRLF) EndFunc ;==>ErrFunc _Example() Func _Example() Local Const $s_RegExp = _ ; $s_RegExp comes from Func _PathSplit( '^\h*((?:\\\\\?\\)*(\\\\[^\?\/\\]+|[A-Za-z]:)?(.*[\/\\]\h*)?((?:[^\.\/\\]|(?(?=\.[^\/\\]*\.)\.))*)?([^\/\\]*))$' Local $sString = 'xxxxxxxxxx' For $iCounter = 1 To 11 ConsoleWrite("- step #" & $iCounter & ' StringLen= ' & StringLen($sString) & @CRLF) StringRegExp($sString, $s_RegExp, 0) $sString &= $sString Next EndFunc ;==>_Example
pixelsearch Posted 8 hours ago Posted 8 hours ago Hello Could you please indicate what version of AutoIt are you using (3.3.xx.x) ? "I think you are searching a bug where there is no bug... don't listen to bad advice."
IronFine Posted 7 hours ago Author Posted 7 hours ago (edited) Sure, this is on 3.3.18.0. The way you asked the question caused me to test again. With #AutoIt3Wrapper_UseX64=y it crashes, with #AutoIt3Wrapper_UseX64=n it does not. Edited 7 hours ago by IronFine
Nine Posted 6 hours ago Posted 6 hours ago You can use my multi-threading UDF this way: #AutoIt3Wrapper_UseX64=y #include "PMT-UDF.AU3" #include <Constants.au3> _PMT_Init() Local $hProc1 = _PMT_Start("_Example") Local $sResponse While Sleep(50) $sResponse = _PMT_GetResponse($hProc1) If @error Then Exit MsgBox($MB_OK, "Error", "Process has dropped") If $sResponse <> "" Then MsgBox($MB_OK + $MB_TOPMOST, "Success", $sResponse & @CRLF) ExitLoop EndIf WEnd Func _Example() Local Const $s_RegExp = _ ; $s_RegExp comes from Func _PathSplit( '^\h*((?:\\\\\?\\)*(\\\\[^\?\/\\]+|[A-Za-z]:)?(.*[\/\\]\h*)?((?:[^\.\/\\]|(?(?=\.[^\/\\]*\.)\.))*)?([^\/\\]*))$' Local $sString = 'xxxxxxxxxx' For $iCounter = 1 To 11 StringRegExp($sString, $s_RegExp, 0) $sString &= $sString Next Return "OK" EndFunc ;==>_Example “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now