Sunblood Posted March 23, 2021 Posted March 23, 2021 This is the built-in example script from the _GUICtrlRichEdit_AutoDetectURL UDF. The GUI shows up and the hyperlink is formatted properly, but nothing happens when the link is clicked (no "Invoke your web browser" message box appears) expandcollapse popup#include <GUIConstantsEx.au3> #include <GuiRichEdit.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> Global $g_hRichEdit Example() Func Example() Local $hGui, $iMsg $hGui = GUICreate("Example (" & StringTrimRight(@ScriptName, StringLen(".exe")) & ")", 320, 350, -1, -1) $g_hRichEdit = _GUICtrlRichEdit_Create($hGui, "This is a test.", 10, 10, 300, 220, _ BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL)) GUISetState(@SW_SHOW) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") _GUICtrlRichEdit_SetEventMask($g_hRichEdit, $ENM_LINK) _GUICtrlRichEdit_AutoDetectURL($g_hRichEdit, True) _GUICtrlRichEdit_AppendText($g_hRichEdit, @CRLF & "http://www.autoitscript.com") While True $iMsg = GUIGetMsg() Select Case $iMsg = $GUI_EVENT_CLOSE _GUICtrlRichEdit_Destroy($g_hRichEdit) ; needed unless script crashes ; GUIDelete() ; is OK too Exit EndSelect WEnd EndFunc ;==>Example Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam Local $hWndFrom, $iCode, $tNMHDR, $tEnLink, $iCpMin, $iCpMax, $tMsgFilter $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $g_hRichEdit Select Case $iCode = $EN_LINK $tMsgFilter = DllStructCreate($tagMSGFILTER, $lParam) If DllStructGetData($tMsgFilter, "msg") = $WM_LBUTTONUP Then $tEnLink = DllStructCreate($tagENLINK, $lParam) $iCpMin = DllStructGetData($tEnLink, "cpMin") $iCpMax = DllStructGetData($tEnLink, "cpMax") MsgBox($MB_SYSTEMMODAL, "", "Invoke your web browser here and point it to " & _GUICtrlRichEdit_GetTextInRange($g_hRichEdit, $iCpMin, $iCpMax)) EndIf EndSelect EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY
Nine Posted March 23, 2021 Posted March 23, 2021 Tested both on Win7 and Win10, and it is working as expected. Do you have the latest version of AutoIt ? “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
Sunblood Posted March 23, 2021 Author Posted March 23, 2021 (edited) I have the latest public release from March 2018 (3.3.14.5) Windows 10 Pro x64 20H2. Edited March 23, 2021 by Sunblood
Nine Posted March 23, 2021 Posted March 23, 2021 Can you try on another computer ? Because I cannot debug something that is working... “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
Sunblood Posted March 23, 2021 Author Posted March 23, 2021 (edited) Same thing on a work PC running Windows 10 Enterprise x64 1909 (also with the latest public autoit) Edited March 23, 2021 by Sunblood
Nine Posted March 23, 2021 Posted March 23, 2021 Ok. I was able to replicate your problem when running x64. If you run it x86, the problem is not showing. “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
Sunblood Posted March 23, 2021 Author Posted March 23, 2021 Hum okay. I'm using x64 to compile as Windows Defender tends to flag the x86 version as malicious (and of course it is not.) Is this something that can be fixed for x64? I can use beta versions if need be.
Nine Posted March 23, 2021 Posted March 23, 2021 Yes problem seems to be resolved in beta v3.3.15.3 (both on Win7 and Win10 btw). “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
Sunblood Posted March 23, 2021 Author Posted March 23, 2021 x86 Beta works as expected. This is what I get with x64 Beta:
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