johnmcloud Posted February 19, 2013 Posted February 19, 2013 (edited) MrCreatoR, This UDF has some incompatibility with Obfuscator Edited February 23, 2013 by johnmcloud
ozmike Posted February 22, 2013 Posted February 22, 2013 in the UDF header comment MRCreator Mentions 4) When using obfuscator, make sure to add event functions to ignore list (#Obfuscator_Ignore_Funcs). Hope that helps..
ozmike Posted March 21, 2013 Posted March 21, 2013 Latest Unofficial version 1.11for those searching for x buttons look no further! I've got X buttons workingX buttons added! 'x'tra buttons 4 & 5 on side of mouse. See my this post further downIf you still have problems with this UDF then try mouse trap UDF
tatane Posted April 23, 2013 Posted April 23, 2013 (edited) Hi ! The script is very helpfull but i've got a problem when i'm using it on a remote computer. When I use UltraVNC to take control of the remote computer using this script, the mouse movements are slow down like there was latency. If i desactivate the Hook, the mouse movements are fine. I guess UltraVNC change the input mouse movements in a certain way and so the script can't follow the updates ? Do you have any idea ? Thanks for your work. P.S : Event handlers i'm using : Left/Right click up/down, Wheel up/down, MouseMove EDIT : I didn't notice until now but the slow down movement is present only outside of the GUI not inside ! Any idea ? Edited April 25, 2013 by tatane
ozmike Posted May 20, 2013 Posted May 20, 2013 try mouse trap UDF - as an alternative..it may or may not fix your problem.. the code is also easier to follow (IMHO) ?do=embed' frameborder='0' data-embedContent>
careca Posted May 23, 2013 Posted May 23, 2013 Hey there ppl, got an issue with a script, as described in this topic: The issue is that it works fine, until i click in the gui, then it crashes. expandcollapse popup#include <misc.au3> #include <WindowsConstants.au3> #include <MouseOnEvent.au3> #include <GUIConstantsEx.au3> Opt("GUIOnEventMode", 1) Local $hDLL = DllOpen("user32.dll") $GUI = GUICreate("GUI Test", 200, 100, 100, 100, -1, $WS_EX_ACCEPTFILES) GUISetOnEvent($GUI_EVENT_CLOSE, "Quit") GUISetState() _MouseSetOnEvent($MOUSE_WHEELSCROLLUP_EVENT, "_MouseWheelUP") _MouseSetOnEvent($MOUSE_WHEELSCROLLDOWN_EVENT, "_MouseWheelDN") ;============================================================================= Func _MouseWheelUP($iEvent) If _IsPressed("56") Then ;V ConsoleWrite('UP' & @CRLF) EndIf EndFunc ;==>_MouseWheelUP ;============================================================================= Func _MouseWheelDN($iEvent) If _IsPressed("56") Then ;V ConsoleWrite('DN' & @CRLF) EndIf EndFunc ;==>_MouseWheelDN ;============================================================================= While 1 Sleep(15) WEnd Func Quit() Exit EndFunc Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
Freetime Posted June 6, 2013 Posted June 6, 2013 I need to block left mouse drag and drop file... How can i do that ?
careca Posted June 7, 2013 Posted June 7, 2013 (edited) MouseClickDrag('left', 100, 100, 500, 500) Or do you mean, block to not be able to drag and drop? Edited June 7, 2013 by careca Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
Freetime Posted June 7, 2013 Posted June 7, 2013 MouseClickDrag('left', 100, 100, 500, 500) Or do you mean, block to not be able to drag and drop? Yeah, I need block to not be able to drag and drop file (disable drag) in Windows Explorer. Thanks.
careca Posted June 8, 2013 Posted June 8, 2013 (edited) Never seen that, i would try to make a script that detects the mouse click, and then have a timer, after that key has been pressed for more than X msecs, force button up. Not sure how it can be done, but i believe it's possible, as for this udf, i don't see the option you need, available. Sugestion: _ispressed, timerinit, send Edited June 8, 2013 by careca Freetime 1 Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
MrKris7100 Posted November 27, 2013 Posted November 27, 2013 #include <MouseSetOnEvent_UDF.au3> _BlockMouseClicksInput(0) ToolTip('MouseClicks is disabled') Sleep(3000) _BlockMouseClicksInput(1) ToolTip('MouseClicks is enabled') Sleep(3000) Func _BlockMouseClicksInput($iOpt=0) If $iOpt = 0 Then _MouseSetOnEvent($MOUSE_PRIMARYUP_EVENT, "__Dummy") _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT, "__Dummy") _MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT, "__Dummy") _MouseSetOnEvent($MOUSE_SECONDARYDOWN_EVENT, "__Dummy") Else _MouseSetOnEvent($MOUSE_PRIMARYUP_EVENT) _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT) _MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT) _MouseSetOnEvent($MOUSE_SECONDARYDOWN_EVENT) EndIf EndFunc ;==>_BlockMouseClicksInput Don't work ... Mouse buttons are enabled ...
AlmarM Posted November 27, 2013 Posted November 27, 2013 #include <MouseSetOnEvent_UDF.au3> _BlockMouseClicksInput(0) ToolTip('MouseClicks is disabled') Sleep(3000) _BlockMouseClicksInput(1) ToolTip('MouseClicks is enabled') Sleep(3000) Func _BlockMouseClicksInput($iOpt=0) If $iOpt = 0 Then _MouseSetOnEvent($MOUSE_PRIMARYUP_EVENT, "__Dummy") _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT, "__Dummy") _MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT, "__Dummy") _MouseSetOnEvent($MOUSE_SECONDARYDOWN_EVENT, "__Dummy") Else _MouseSetOnEvent($MOUSE_PRIMARYUP_EVENT) _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT) _MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT) _MouseSetOnEvent($MOUSE_SECONDARYDOWN_EVENT) EndIf EndFunc ;==>_BlockMouseClicksInput Don't work ... Mouse buttons are enabled ... Wheres __Dummy? Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
AlmarM Posted November 28, 2013 Posted November 28, 2013 How should the __ Dummy? I never really looked into the UDF, but I think I may assume you need to define __Dummy somwhere. Func __Dummy() EndFunc Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
MrKris7100 Posted November 28, 2013 Posted November 28, 2013 #include <MouseSetOnEvent_UDF.au3> _BlockMouseClicksInput(0) ToolTip('MouseClicks is disabled') Sleep(3000) _BlockMouseClicksInput(1) ToolTip('MouseClicks is enabled') Sleep(3000) Func _BlockMouseClicksInput($iOpt=0) If $iOpt = 0 Then _MouseSetOnEvent($MOUSE_PRIMARYUP_EVENT, "__Dummy") _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT, "__Dummy") _MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT, "__Dummy") _MouseSetOnEvent($MOUSE_SECONDARYDOWN_EVENT, "__Dummy") Else _MouseSetOnEvent($MOUSE_PRIMARYUP_EVENT) _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT) _MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT) _MouseSetOnEvent($MOUSE_SECONDARYDOWN_EVENT) EndIf EndFunc ;==>_BlockMouseClicksInput Func __Dummy() EndFunc Don't work.... Buttons are enabled
ozmike Posted December 18, 2013 Posted December 18, 2013 See the example BlockMouseClicksInput, you must pass a 0 , 1 you don't even need to define a dummy func.. hope it helps. Func _BlockMouseClicksInput($iOpt = 0) If $iOpt = 0 Then _MouseSetOnEvent($MOUSE_PRIMARYUP_EVENT, "__Dummy", 0, 1) _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT, "__Dummy", 0, 1) _MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT, "__Dummy", 0, 1) _MouseSetOnEvent($MOUSE_SECONDARYDOWN_EVENT, "__Dummy", 0, 1) Else _MouseSetOnEvent($MOUSE_PRIMARYUP_EVENT) _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT) _MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT) _MouseSetOnEvent($MOUSE_SECONDARYDOWN_EVENT) EndIf EndFunc
PsiLink Posted March 29, 2015 Posted March 29, 2015 (edited) Hi, MrCreatoR. I'v been interested in setting some mouse hotkeys, but at current state this UDF has some very limited use. For example, following code is valid, because standard HotkeySet leaks the key into processing chain, while yours doesn't. #include <misc.au3> HotkeySet("z", "SomeFunc") While 1 Sleep(40) WEnd Func SomeFunc() While _IsPressed "5A" SomeRepeatableFunc() Sleep(10) WEnd EndFunc Func SomeRepeatableFunc() Send("Holla! ") EndFunc If it would, then there would be a lot easier to set a "combined hotkey" such as: #include <misc.au3> #include "MouseOnEvent.au3" _MouseSetOnEvent($RMouse, "SomeFunc") While 1 Sleep(100) WEnd Func SomeFunc() _MouseSetOnEvent($LMouse, "SomeRepeatableFunc") While _IsPressed (2) Sleep(50) WEnd _MouseSetOnEvent($LMouse) EndFunc Func SomeRepeatableFunc() Send("Holla! ") EndFunc AHK has mouse hotkeys, hotkeys combination and Keyb+mouse hotkeys supported natively, but Autoit is much more convenient to use , so I was wondering... P.S. ;Altered var names for convenience measures Global Const $MouseMv_EV = 0x200 ;512 (WM_MOUSEMOVE) ; ==> Mouse moving. Global Const $LMouse = 0x201 ;513 (WM_LBUTTONDOWN) ; ==> Primary mouse button down. Global Const $LMouseUP = 0x202 ;514 (WM_LBUTTONUP) ; ==> Primary mouse button up. Global Const $LMouseDClick = 0x203 ;515 (WM_LBUTTONDBLCLK) ; ==> Primary mouse button double click. Global Const $RMouse = 0x204 ;516 (WM_RBUTTONDOWN) ; ==> Secondary mouse button down. Global Const $RMouseUP = 0x205 ;517 (WM_RBUTTONUP) ; ==> Secondary mouse button up. Global Const $RMouseDClick = 0x206 ;518 (WM_RBUTTONDBLCLK) ; ==> Secondary mouse button double click. Global Const $MMouse = 0x207 ;519 (WM_MBUTTONDOWN) ; ==> Wheel mouse button pressed down. Global Const $MMouseUP = 0x208 ;520 (WM_MBUTTONUP) ; ==> Wheel mouse button up. Global Const $MMouseDClick = 0x209 ;521 (WM_MBUTTONDBLCLK) ; ==> Wheel mouse button double click. Global Const $Wheel_EV = 0x20A ;522 (WM_MOUSEWHEEL) ; ==> Wheel mouse scroll. Global Const $WheelDown = 0x20A + 8 ;530 (WM_MOUSEWHEEL + 8) ; ==> Wheel mouse scroll Down. Global Const $WheelUp = 0x20A + 16 ;538 (WM_MOUSEWHEEL + 16) ; ==> Wheel mouse scroll Up. Global Const $MouseX_EV = 0x20B ;523 (WM_XBUTTONDOWN) ; ==> Side mouse button down (usually navigating next/back buttons). Global Const $MouseXUP_EV = 0x20C ;524 (WM_XBUTTONUP) ; ==> Side mouse button up. Global Const $MouseXDClick = 0x20D ;525 (WM_XBUTTONDBLCLK) ; ==> Side mouse button double click. Edited April 1, 2015 by PsiLink
MrCreatoR Posted March 31, 2015 Author Posted March 31, 2015 Hi, MrCreatoR. I'v been interested in setting some mouse hotkeys, but at current state this UDF has some very limited use. For example, following code is valid, because standard HotkeySet leaks the key into processing chain, while yours doesn't.Hi, i am not sure that i understand, what exactly are you trying to do, what your expecting to happen? Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team
PsiLink Posted April 1, 2015 Posted April 1, 2015 The thing is, that native Autoit function HotkeySet and your UDF function a little differently. #include <misc.au3> #include "mouseOnEvent.au3" HotkeySet("z", "SomeFunc") _MouseSetOnEvent($RMouse, "AnotherFunc") While 1 Sleep(100 WEnd Func SomeFunc() While _IsPressed("5A") ConsoleWrite('KeybZ ') Sleep(10) WEnd EndFunc Func AnotherFunc() While _IsPressed(2) ConsoleWrite('RMB2 ') Sleep(10) WEnd EndFunc I want to set some "combined hotkeys" like RMB+LMB, RMB+WheelDown or even RMB+move mouse in certain direction. For this to work, _IsPressed should notice the key was actually pressed and that is a problem. My current solution is all about using _IsPressed(), but it could have been much more convenient if there were actual hotkey expandcollapse popup#include <MouseOnEvent.au3> #include <Misc.au3> Global Const $Btn1Down = '_IsPressed(1)' ;LMB Global Const $Btn2Down = '_IsPressed(2)' ;RMB $bRBMUsedInHK = False Loop() Func Loop() While 1 If Execute($Btn2Down) Then While Execute($Btn2Down) Sleep(30) If Execute($Btn1Down) Then While Execute($Btn1Down) Sleep(10) WEnd ConsoleWrite('1 ') $bRBMUsedInHK = True EndIf WEnd EndIf If $bRBMUsedInHK Then ;Close context menu if any Send("{altdown}") Sleep(40) Send("{altup}") $bRBMUsedInHK = False EndIf Sleep(50) WEnd EndFunc P.S. Можно и на русском, но форум ведь зарубежный
Iczer Posted July 11, 2015 Posted July 11, 2015 i have some troubles with using MouseSetOnEvent udf in x64 script - after mouse clicks it always crush with "AutoIt3.exe ended.rc:128"#AutoIt3Wrapper_UseX64=Y #include "MouseOnEvent.au3" $Form1 = GUICreate("some gui", 333, 222, @DesktopWidth/2-175, @DesktopHeight/2-111) $Input1 = GUICtrlCreateInput("some text", 8, 8, 921, 21) GUISetState(@SW_SHOW) _MouseSetOnEvent($MOUSE_PRIMARYDBLCLK_EVENT, '_DblClk_Event') While 1 Sleep(10) WEnd _MouseSetOnEvent($MOUSE_PRIMARYDBLCLK_EVENT)is there a some fix for it?
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