$hgXyZ = GUICtrlCreateCheckbox("cAsE-sEnSiTiVe", $iX + 50, $iY + 65, -1, -1) $hgGL0 = GUICtrlCreateLabel("Enter a string or regular expression" & & "(space between words means ""OR"")", $iX + 50, $iY, 250, 30) $hgGGrep = GUICreate("Grep for Windows: Simple TeXT search", 600, $hgGGrep) Would greatly appreciate a pointer or two. I tried (among many other things) Melba23's technique in the post below, but this doesn't do what I'm after - getting the left click to set the insertion point for user input. This seems like a basic feature of GUI functionality that should work out of the box (like Tab), but clearly I'm missing something. The sticking point is that while the Tab key works to move focus from one input control to the next, clicking the mouse on any but the first input does nothing. I have a basic GUI, but I'm stuck on one point and nothing I've tried so far works. Update: Download the latest version here.Īs my first stab at GUI scripting, I'm trying to write a simple graphical interface for Grep for Windows. ToolTip("Secondary Mouse Button Up Blocked") ToolTip("Primary Mouse Button Down Blocked") ToolTip("Wheel Mouse Button (scrolling) UP Blocked") ToolTip("Wheel Mouse Button (scrolling) DOWN Blocked") _MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT) _MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT, "_MouseSecondaryUp_Event", $hGUI) A little(?) bugie when you mix different events :( _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT, "_MousePrimaryDown_Event", $hGUI) GUICtrlCreateLabel("Press to exit", 10, 10) GUICtrlCreateLabel("Try to click on that specific GUI window", 40, 40, 300, 30) Local $hGUI = GUICreate("MouseOnEvent UDF Example - Restrict events on specific window") _MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT, "_MouseSecondaryUp_Event", 0, 1) MsgBox(64, "Attention!", "Now let's disable Secondary mouse button up action, and call our event function.", 5) _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT) _MouseSetOnEvent($MOUSE_WHEELSCROLLUP_EVENT) _MouseSetOnEvent($MOUSE_WHEELSCROLLDOWN_EVENT) _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT, "_MousePrimaryDown_Event") _MouseSetOnEvent($MOUSE_WHEELSCROLLUP_EVENT, "_MouseWheel_Events") _MouseSetOnEvent($MOUSE_WHEELSCROLLDOWN_EVENT, "_MouseWheel_Events") Set event function for mouse wheel *scrolling* up/down and primary button *down* action (call our function when the events recieved) MsgBox(64, "Attention!", "Let's set event function for mouse wheel *scrolling* up and down", 5) I searched for a way to disable the Mouse Primary click, and be able to call some function when the click event is received.īig thanks to amel27 for this one, i only organized the whole stuff to UDF style. This UDF allows to set an events handler for Mouse device.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |