freeday7123 Posted January 2, 2023 Posted January 2, 2023 (edited) I just want to press one button to send the key to job which will be sent alternately when pressed 1 time Send MouseWheel($MOUSE_WHEEL_UP, 5) and when pressed again will send MouseWheel($MOUSE_WHEEL_DOWN , 5) Please make an example for me, thank you very much. If there are many samples i will be very grateful my example Func _start() $i = 0 Do If _IsPressed("34", $hDLL) Then MouseWheel($MOUSE_WHEEL_UP, 5) ElseIf _IsPressed("34", $hDLL) Then MouseWheel($MOUSE_WHEEL_DOWN , 5) EndIf Sleep(10) Until $i = 1 EndFunc Edited January 2, 2023 by Melba23
ioa747 Posted January 2, 2023 Posted January 2, 2023 (edited) @freeday7123 Quote I just want to press one button to send the key to job which will be sent alternately when pressed 1 time Send MouseWheel($MOUSE_WHEEL_UP, 5) and when pressed again will send MouseWheel($MOUSE_WHEEL_DOWN , 5) Please make an example for me, thank you very much. If there are many samples i will be very grateful my example: Func _start() $i = 0 Do If _IsPressed("34", $hDLL) Then MouseWheel($MOUSE_WHEEL_UP, 5) ElseIf _IsPressed("34", $hDLL) Then MouseWheel($MOUSE_WHEEL_DOWN , 5) EndIf Sleep(10) Until $i = 1 EndFunc it looks better that way How to post code on the forum Edited January 3, 2023 by ioa747 I know that I know nothing
ioa747 Posted January 2, 2023 Posted January 2, 2023 @freeday7123 is this OK ? #include <AutoItConstants.au3> #include <Misc.au3> $i = 0 Do If _IsPressed("61") Then ; 61 Numeric keypad 1 key MouseWheel($MOUSE_WHEEL_UP, 5) ElseIf _IsPressed("60") Then ; 60 Numeric keypad 0 key MouseWheel($MOUSE_WHEEL_DOWN, 5) EndIf Sleep(10) Until $i = 1 I know that I know nothing
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