amino Posted February 19, 2018 Share Posted February 19, 2018 Hello my friends, I'm a big noob. I want to make a script which scrolls up the mouse wheel one time and then scrolls down one time AFTER I released (not pressed) the right mouse button. Is this possible with AutoIt? Thanks in advance Link to comment Share on other sites More sharing options...
TheXman Posted February 20, 2018 Share Posted February 20, 2018 1 hour ago, amino said: Is this possible with AutoIt? Yes. You could do it with a combination of _IsPressed to capture the right mouse being pressed and released and MouseWheel to do your scrolling up and down. Look at the examples in the help file for details. Not sure why you want to trigger it on the right mouse button since it triggers a context menu in most applications. Here's a very simple example: #include <Misc.au3> example() Func example() Local $hDll = DllOpen("user32.dll") While True Sleep(10) ;If right mouse button pressed If _IsPressed("02", $hDll) Then ;Wait until no longer pressed While _IsPressed("02", $hDll) Sleep(10) WEnd ;Do your action MsgBox(0, "Example", "Right mouse button released") ExitLoop EndIf WEnd DllClose($hDll) EndFunc CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman 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