Cheblon Posted February 20, 2009 Share Posted February 20, 2009 Is there a way to get the value of how much the mouse wheel has been moved? For example, a command that returned a value of -2 could mean the mouse wheel has been moved two ticks downwards. I've been searching the forums and the help but cannot find anything on this. Any help would be great, thank you. Link to comment Share on other sites More sharing options...
bo8ster Posted February 20, 2009 Share Posted February 20, 2009 That is a good question. Look in the help file under mouse MouseClick. It might be registered with middle button. I have not used or seen anything with the wheel here. Good luck! Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] Link to comment Share on other sites More sharing options...
Manjish Posted February 20, 2009 Share Posted February 20, 2009 I think u'll get what u need here..U'll need to translate it to au3.. gool luck with that.. [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com Link to comment Share on other sites More sharing options...
bo8ster Posted February 20, 2009 Share Posted February 20, 2009 Just had a look round, have a look at here and 1888 here. Also look at the MouseWheel function. Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] Link to comment Share on other sites More sharing options...
Ealric Posted February 20, 2009 Share Posted February 20, 2009 You are looking for the following function: _WinAPI_Mouse_Event See the help file and the MSDN for more detail on how to use it. My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic] Link to comment Share on other sites More sharing options...
Cheblon Posted February 20, 2009 Author Share Posted February 20, 2009 Thanks for all your help, still trying to work out exactly how to use the _WinAPI_Mouse_Event (as i came across it before) If anyone can do me a really simple example of how to grab the mouse wheel value, would appreciate it! Link to comment Share on other sites More sharing options...
Authenticity Posted February 20, 2009 Share Posted February 20, 2009 Neither MouseWheel nor _WinAPI_Mouse_Event can be of help to get the amount of wheel scrolling been preformed. If it's your GUI you can process the WM_MOUSEWHEEL (0x020A) and check the hi-word of $wParam to see if it's positive value (wheel up) or negative value (wheel down) both contain a multiple of 120. Link to comment Share on other sites More sharing options...
jvanegmond Posted February 20, 2009 Share Posted February 20, 2009 Here is a low level mouse hook: http://www.autoitscript.com/forum/index.php?showtopic=81761 github.com/jvanegmond Link to comment Share on other sites More sharing options...
Cheblon Posted February 20, 2009 Author Share Posted February 20, 2009 Thanks Authenticity and Manadar, this was more of the thing i was looking for Link to comment Share on other sites More sharing options...
Drew Posted February 20, 2009 Share Posted February 20, 2009 If its a loop running and your curious how many times its rolling the wheel to complete what you scripted the loop to do... You could simply add a $var + 1 after each succesful loop and msgbox when it comes up. If this is not the case: You can also just use the on_event commands and use the same idea adding 1 to a var and triggering a msgbox() or the like to display the information. Link to comment Share on other sites More sharing options...
Cheblon Posted February 21, 2009 Author Share Posted February 21, 2009 Thank you Drew, it is loop driven and i have already implemented the $var + 1. Manadar's link to a low level mouse hook was a good way of testing which way the mouse wheel and been turned. Suggest anyone wanting to do the same thing to check it out too. Thanks for everyone's help on this problem Link to comment Share on other sites More sharing options...
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