dersiniar Posted June 8, 2022 Posted June 8, 2022 (edited) How to disable mouse klicks in Global $edit = GUICtrlCreateEdit("", 15, 50,810,360, BitOR($ES_READONLY, $WS_VSCROLL, $ES_AUTOVSCROLL), 0) I do not want to use GUICtrlSetState ( $edit, $GUI_DISABLE ) Maybe there's some sort of layering possibility? to use some kind of layer with transparent option. I use editbox to show info. (like console) Maybe there's better way for this instead editbox? Edited June 8, 2022 by dersiniar
Zedna Posted June 9, 2022 Posted June 9, 2022 You probalbly have to subclass your editbox and catch some windows' message (take focus??) and return 0 there Here is old exmaple for similar subclassing: Resources UDF ResourcesEx UDF AutoIt Forum Search
Zedna Posted June 9, 2022 Posted June 9, 2022 Here is simple solution using WM_KILLFOCUS #include <EditConstants.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <SendMessage.au3> $GUI = GUICreate("Example", 200, 200) $INPUT = GUICtrlCreateInput("123", 50, 50, 80, 20, BitOr($GUI_SS_DEFAULT_INPUT, $ES_READONLY)) $hINPUT = GUICtrlGetHandle($INPUT) $INPUT2 = GUICtrlCreateInput("456", 50, 70, 80, 20) $ok = GUICtrlCreateButton("OK", 50, 100, 80, 20) GUISetState() While 1 $msg = GUIGetMsg() If $msg = -3 Then Exit If $msg = $GUI_EVENT_PRIMARYDOWN Then _SendMessage($hINPUT, $WM_KILLFOCUS, 0) ; pseudocode: ;~ If _WinAPI_WindowFromPoint(MouseGetPos()) = $hINPUT Then _SendMessage($hINPUT, $WM_KILLFOCUS, 0) EndIf WEnd Resources UDF ResourcesEx UDF AutoIt Forum Search
dersiniar Posted June 10, 2022 Author Posted June 10, 2022 19 hours ago, Zedna said: Here is simple solution using WM_KILLFOCUS #include <EditConstants.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <SendMessage.au3> $GUI = GUICreate("Example", 200, 200) $INPUT = GUICtrlCreateInput("123", 50, 50, 80, 20, BitOr($GUI_SS_DEFAULT_INPUT, $ES_READONLY)) $hINPUT = GUICtrlGetHandle($INPUT) $INPUT2 = GUICtrlCreateInput("456", 50, 70, 80, 20) $ok = GUICtrlCreateButton("OK", 50, 100, 80, 20) GUISetState() While 1 $msg = GUIGetMsg() If $msg = -3 Then Exit If $msg = $GUI_EVENT_PRIMARYDOWN Then _SendMessage($hINPUT, $WM_KILLFOCUS, 0) ; pseudocode: ;~ If _WinAPI_WindowFromPoint(MouseGetPos()) = $hINPUT Then _SendMessage($hINPUT, $WM_KILLFOCUS, 0) EndIf WEnd This does not work as needed. My editbox will receive info from For $i = 1 to _FileCountLines($file) Global $url = FileReadLine($file, $i) to show information. And it takes about 1hr for loop. So i cant use GUIGetMsg() Does autoit have a possibility to Layer edit box with something that has transparency so info will be visible.? By layering i mean, some square object, blank image etc.
Nine Posted June 10, 2022 Posted June 10, 2022 Check example of _WinAPI_SetWindowSubclass. Instead of subclassing the window, subclass the edit box and intercept $WM_LBUTTONDOWN. If you require more help, please provide a base snippet of the code you are using so we do not have to recreate one from scratch. “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) Screen Scraping Multi-Threading Made Easy
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