izzy Posted November 17, 2005 Posted November 17, 2005 HotKeySet("{ESC}", "Terminate") HotKeySet("{MWHEEL_DOWN}", "MouseWheelDown") HotKeySet("{MWHEEL_UP}", "MouseWheelUp") ;;;; Body of program;;;; While 1 Sleep(100) WEnd ;;;;;;;; Func Terminate() Exit 0 EndFunc Func MouseWheelDown() ToolTip('Mouse Wheel Scrolled Down',0,0) EndFunc Func MouseWheelUp() ToolTip('Mouse Wheel Scrolled Up',0,0) EndFunc Is there something like HotKeySet("{MWHEEL_DOWN}", "MouseWheelDown") ? Thank you
alexischeng Posted November 17, 2005 Posted November 17, 2005 Try This one! And pls comment! #include <GUIConstants.au3> $test=100 $test2=100 GUICreate("Test_Mouse_Wheel",220,100, 100,200) GUISetBkColor (0x00E0FFFF) ; will change background color $slider1 = GUICtrlCreateSlider (10,10,200,20) GUICtrlSetLimit(-1,200,0) ; change min/max value $button = GUICtrlCreateButton ("Stop",75,70,70,20) GUISetState() GUICtrlSetData($slider1,100) ; set cursor Do $test=GUICtrlRead($slider1) if $test>$test2 then $test1=GUICtrlSetData ($button,"Down") endif if $test<$test2 then $test1=GUICtrlSetData ($button,"Up") endif sleep (100) $test1=GUICtrlSetData ($button,"Stopped") ;$test1=GUICtrlSetData ($button,$test) GUICtrlSetState($slider1,$GUI_FOCUS+$GUI_HIDE) $test2=$test sleep (100) $n = GUIGetMsg () until $n = $GUI_EVENT_CLOSE
Valuater Posted November 17, 2005 Posted November 17, 2005 because the middle button/whell has no value for "staying" down... there is no command for that help states this MouseWheel ( "direction" [, clicks] )...... up/down direction but this should do what you want MouseClick ( "middle") sleep(5000) MouseClick ( "middle") 8)
izzy Posted November 19, 2005 Author Posted November 19, 2005 Thank you for the respnoses... The suggestions you made seem very intersting. The reason I asked about this is that I want to capture scrolls done with the mouseWheel, that happen in other applications but dont actually do anything to the Scrollbar, in those other applications. Are there any plans of adding something of the sort to AutoIt3, like AutoHotkey, for the mousewheel detection? Thank you
alexischeng Posted November 19, 2005 Posted November 19, 2005 Hi, As I know the mouse wheel scroll up and down function is detect by Window itelf (i.e. done by the mouse driver) and what yu can get is the result of the scroll , like up/down arrow key. So I use a hidden slider window to detect it. See if anyone could have other ideas.
izzy Posted November 20, 2005 Author Posted November 20, 2005 Is it possible to subclass globaly and capture Even Mesages and get the WM_MOUSEWHEEL event?
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