+WheelUp::
Loop 4
send,{WheelUp}
returnBut, I can't find the way to reduce wheel scroll speed.
Please tell me how to. Thank you in advance.
Posted 15 June 2012 - 11:01 AM
+WheelUp::
Loop 4
send,{WheelUp}
returnPosted 15 June 2012 - 12:26 PM
halfspeed := 0
+WheelUp::
If halfspeed
send,{WheelUp}
halfspeed := !halfspeed
return
this should ignore every other notch in your wheel.
Posted 15 June 2012 - 03:57 PM
halfspeed := 0
+WheelUp::
If halfspeed
send,{WheelUp}
halfspeed := !halfspeed
return
this should ignore every other notch in your wheel.Posted 15 June 2012 - 05:20 PM
Posted 15 June 2012 - 06:06 PM
why do you have to use a script for it, why not : control panel / mouse / wheel ?
Posted 15 June 2012 - 07:02 PM
+WheelUp:: loop, 2 ; adjust the no. 2 to control scroll speed PostMessage, 0x115,0,0,ControlName,WindowTitle ; vertical scroll up return +WheelDown:: loop, 2 ; adjust the no. 2 to control scroll speed PostMessage, 0x115,1,0,ControlName,WindowTitle ; vertical scroll down return
Posted 17 June 2012 - 11:29 AM
use "window spy" to get control name and window name then use:
+WheelUp:: loop, 2 ; adjust the no. 2 to control scroll speed PostMessage, 0x115,0,0,ControlName,WindowTitle ; vertical scroll up return +WheelDown:: loop, 2 ; adjust the no. 2 to control scroll speed PostMessage, 0x115,1,0,ControlName,WindowTitle ; vertical scroll down return
Posted 17 June 2012 - 11:30 AM
use "window spy" to get control name and window name then use:
+WheelUp:: loop, 2 ; adjust the no. 2 to control scroll speed PostMessage, 0x115,0,0,ControlName,WindowTitle ; vertical scroll up return +WheelDown:: loop, 2 ; adjust the no. 2 to control scroll speed PostMessage, 0x115,1,0,ControlName,WindowTitle ; vertical scroll down return
Thank you for your reply, but your script doesn't solve my problem.
I don't want to change basic scroll speed 5, and loop parameter in your script multiples "5",
it means I can't decrease the speed below 5.
Posted 17 June 2012 - 03:48 PM
There is no need to change basic scroll speed, PostMessage will scroll 1 line, loop will multiply 1's.Thank you for your reply, but your script doesn't solve my problem.
I don't want to change basic scroll speed 5, and loop parameter in your script multiples "5",
it means I can't decrease the speed below 5.
SetTitleMatchMode, 2 #IfWinActive, Opera +WheelUp:: ControlGetFocus, control, A loop, 2 SendMessage, 0x115, 0, 0, %control%, A ; scroll up 1 line return +WheelDown:: ControlGetFocus, control, A loop, 2 SendMessage, 0x115, 1, 0, %control%, A ; scroll down 1 line return #IfWinActive
Posted 17 June 2012 - 04:19 PM
...easiest solution: set Windows to 1, then use a script to speed it up from there.Because I want to set up the scroll speed individually like Opera is 2, Chrome is 5, and notepad is 10.
...ohh, so you already thought of that.And yes I can set the basic speed as low as possible using Windows mouse setting...
...you can use an...so If I only use my code to adjust my mouse setting I have to make lots of scroll speed rules for over 50 applications that use medium "5" scroll speed setting.
else clause...just handle all the "specials" in an if / else if tree, then use one last else to handle "the rest" / the default setting....that's good to know. However, you REALLY should've explained/used a var forThere is no need to change basic scroll speed...
0x115, magic numbers make me itch...(plus, there's just no reason to be cryptic). Just assign 0x115 to the WM_* var it's related too...for example, WM_WTF:=0x115...Posted 17 June 2012 - 05:30 PM
Posted 17 June 2012 - 06:48 PM
if / else if tree (mentioned by JSLover) sends corresponding number of messages.WheelUp::
WheelDown::
MouseGetPos,,,win,hnd,3
WinGetClass WinCl, ahk_id %win%
If WinCl in Notepad,WordPadClass [color=#008000]; NotePad and WordPad - ten lines scroll[/color]
loop 10
PostMessage, 0x115, (A_ThisHotKey = "WheelDown"), 0,,ahk_id %hnd%
else If WinCl in CabinetWClass,ExploreWClass [color=#008000]; Explorer - two lines scroll[/color]
loop 2
PostMessage, 0x115, (A_ThisHotKey = "WheelDown"), 0,,ahk_id %hnd%
else If WinCl in OpWindow [color=#008000]; Opera - five keystrokes UP or DOWN[/color]
ControlSend,, % (A_ThisHotKey = "WheelDown") ? "{Down 5}" : "{Up 5}", ahk_id %hnd%
else [color=#008000]; any else app - one wheel notch[/color]
ControlClick,, ahk_id %hnd%,, %A_ThisHotKey%, 1
return
Posted 18 June 2012 - 02:19 PM
...no, I didn't...looking up a "Windows Constant", to find its name (like WM_WTF) from a number is much harder than looking it up from the constant's name to its number.Either case I am sure you figured out what 0x115 means...
SendMessage, 0x115...but the docs should demonstrate using it correctly, by assigning 0x115 to some var (with the correct name), then using that var. That's the entire reason Windows Constant's exist...so people use the names.SendMessage, 0x115...or...
WM_SOMEMSG:=0x115 SendMessage, WM_SOMEMSG...I used
WM_SOMEMSG here, since I didn't reverse-lookup 0x115 yet (since I shouldn't have to).SendMessage, 0x115 doesn't say ANYTHING about what it MIGHT do. 0x115?...wtf is that??? At least when you assign the "magic number" to a var, with the correct name (from the Windows Constants)...people can have a clue as to what the code does.SendMessage, 0x119 SendMessage, 0x138...you don't know!, do you? (yes, I just made up numbers, I don't know what they do -- or if they exist) This is the problem with magic numbers, no one knows what they do.
...it is in the "damn AutoHotkey Docs" as 0x115...which means it doesn't tell me what it means....it is in the “damn AutoHotkey Docs”, right !!!