Scrolling inactive window Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
O120D6
Posts: 3
Joined: 18 Jun 2017, 13:18

Scrolling inactive window

20 Jun 2017, 12:41

Anybody know why this doesnt work

Code: Select all

Numpad1::
WinGet, hwnds, ID, A
return
WheelDown::
ControlSend,, {Down}, ahk_id %hwnds% ;
return
WheelUp::
ControlSend,, {Up}, ahk_id %hwnds% ;
return
I want to scroll with my scroll inactive window, without focus on it.
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Scrolling inactive window

20 Jun 2017, 14:49

3 possibilities:

Code: Select all

q::
ControlSend, ahk_parent, {Down}, A
return

w::
ControlGetFocus, vCtlClassNN, A
ControlSend, % vCtlClassNN, {Down}, A
return

e::
ControlSend,, {Down}, A
return
I found that with WheelUp/WheelDown, you had to be hovering over the control for it to work.
Wheeling the IE wepage underneath another one - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 38#p150338

You can also try PgUp/PgDn.

[EDIT:] Some other scroll-related links
To Scroll the Bar with Arrow Keys - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=31960
Detect if classNN is scrollable - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=32027
Getting position and size of the scroll bar - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=31740
Last edited by jeeswg on 20 Jun 2017, 21:18, edited 1 time in total.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
AlphaBravo
Posts: 586
Joined: 29 Sep 2013, 22:59

Re: Scrolling inactive window  Topic is solved

20 Jun 2017, 16:37

Code: Select all

SB_LINEUP			:= 0		; Scrolls one line up.
SB_LINEDOWN			:= 1		; Scrolls one line down.
SB_PAGEUP			:= 2		; Scrolls one page up.
SB_PAGEDOWN			:= 3		; Scrolls one page down.
SB_THUMBPOSITION	:= 4		; scroll box Dragged
SB_THUMBTRACK		:= 5		; scroll box dragging 
SB_TOP				:= 6		; Scrolls to the upper left.
SB_BOTTOM			:= 7		; Scrolls to the lower right.
SB_ENDSCROLL		:= 8		; Ends scroll.

WheelDown::
SendMessage, 0x115, %SB_LINEDOWN%, 0, %Control% , %WinTitle%
return

WheelUp::
SendMessage, 0x115, %SB_LINEUP%, 0, %Control% , %WinTitle%
return

Numpad1::
ControlGetFocus, Control, A
WinGetTitle, WinTitle, A
return
O120D6
Posts: 3
Joined: 18 Jun 2017, 13:18

Re: Scrolling inactive window

21 Jun 2017, 05:54

=) thanks for help, I still dont understand why my code doesnt work. ~AlphaBravo's code was that I was looking for, 1thanks. Anyway, thanks for replies everybody.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: mmflume, ShatterCoder and 92 guests