StrokesPlus Forum
                       
StrokesPlus Forum
Home | Profile | Register | Active Topics
Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General Discussion
 General Discussion
 What is `Enable Mouse Wheel Relay` used for ?
 New Topic  Reply to Topic
 Printer Friendly
Author  Topic Next Topic  

qaws18726

3 Posts

Posted - 11/27/2017 :  02:08:28  Show Profile  Reply with Quote
From http://www.strokesplus.com/help/ :

StrokesPlus will relay all mouse wheel scroll events directly to the control below the mouse cursor regardless of state. This lets you scroll controls, lists, windows which aren't active or selected by only scrolling the mouse wheel over top of them.

-----

Its usage is hard to understand . Any example ?

I faced a problem that I have a AHK script to enable scroll switch tab on Chrome(when cursor hover on tab bar), which strokesplus need press Stroke Button then scroll(sorry, I don't like this, finger feel bad) . If `Enable Mouse Wheel Relay` checked, my AHK script can't work. Uncheck this option seems nothing harm to strokesplus's original behavious, "press Stroke Button` then scroll " still working . So I don't understand what it used for.




Edited by - qaws18726 on 11/27/2017 02:14:11

Rob

USA
2432 Posts

Posted - 11/27/2017 :  08:39:39  Show Profile  Visit Rob's Homepage  Reply with Quote
That option tells S+ to capture and post mouse scroll messages to the control underneath the current mouse position, regardless if the control/window is the active (foreground) window. Basically, so you can be in on program on one monitor that you're using, and move the mouse to another program on a different monitor and scroll the mouse wheel, which will send the wheel messages to that application without having to click anywhere in the app to make it the active application. I think in the recent Windows versions, they've actually built that functionality into (after way too many years), but not everyone uses the latest Windows 10, so this still gives them the functionality via S+.

So unless you specifically want that functionality, it is completely safe to leave it unchecked.

Also, you can accomplish what you're doing in S+, as I have the same thing, a script to switch Chrome tabs when scrolling the mouse button along the top edge of Chrome. Well, I also have a section which scrolls to the top or bottom if the mouse is right along the right edge of Chrome, and will refresh (scroll mouse wheel up) or navigate back (scroll mouse wheel down) if the mouse is along the left edge of Chrome.

Obviously you don't have to keep my edge detection stuff, which currently requires you to move the mouse to the top edge of Chrome to scroll tabs, but I figured I would provide an example for you and others.

Important: To utilize this script, you must enable the Allow Mouse Wheel Tick Script* option.

In your Global Lua tab, see if you already have a function defined for sp_wheel_tick. If you do not (or if it's there but empty), simply paste the function and code below (or replace the existing one). If you have some code already in this function, obviously you'd need to merge the code below into the function to work with your existing script.
function sp_wheel_tick(control, wParam, lParam, x, y, delta)
	local exe = acGetExecutableName(control, nil, nil) --get the name of the EXE
	local owner = acGetOwnerWindowByPoint(x, y) --get the owner window of the control
	if exe == "chrome.exe" or exe == "notepad++.exe" then
		if y <= acGetWindowTop(owner) + 64 then --is the mouse in the top 64 pixel area of the window?
			if delta > 0 then
				--mouse wheel scrolled up
				acSendKeys("^{TAB}")
			else
				--mouse wheel scrolled down
				acSendKeys("^+{TAB}")
			end
			return
		end
		if x >= acGetWindowRight(owner) - 25 then --is the mouse along the right side of the window?
			if delta > 0 then
				--scroll up, send CTRL+Home to go to the top of the page
				acSendKeys("^{HOME}")
			else
				--scroll up, send CTRL+End to go to the end of the page
				acSendKeys("^{END}")
			end
			return
		end
		if exe == "chrome.exe" and x <= acGetWindowLeft(owner) + 10 then 
			if delta > 0 then
				--scroll up, send CTRL+Home to go to the top of the page
				acSendKeys("{F_5}")
			else
				--scroll up, send CTRL+End to go to the end of the page
				acSendKeys("{BROWSERBACK}")
			end
			return
		end
	end
	--Default, pass mouse wheel message onto the original control
	acPostMessage(control, 0x020A, wParam, lParam)
end
Go to Top of Page

qaws18726

3 Posts

Posted - 11/28/2017 :  00:41:12  Show Profile  Reply with Quote
Thank you, it is very kind of you to share this useful script!
Go to Top of Page

Hard.Wired

23 Posts

Posted - 11/28/2017 :  04:56:36  Show Profile  Reply with Quote
Spatially aware controls. Interesting!
Go to Top of Page

Hard.Wired

23 Posts

Posted - 11/29/2017 :  15:56:31  Show Profile  Reply with Quote
This may be even more handy in the upcoming Windows 10 update!

Edited by - Hard.Wired on 11/29/2017 15:57:23
Go to Top of Page

Rob

USA
2432 Posts

Posted - 11/29/2017 :  15:59:15  Show Profile  Visit Rob's Homepage  Reply with Quote
Oooh, indeed. Very nice :-)
Go to Top of Page

Hard.Wired

23 Posts

Posted - 11/29/2017 :  16:53:11  Show Profile  Reply with Quote
Huh, look what I found! This could be an alternative if Microsoft decides not to include it...

https://www.ghacks.net/2017/11/18/stardock-groupy-tabs-for-your-windows/
Go to Top of Page
   Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
StrokesPlus Forum © 2011-2017 Rob Yapchanyk Go To Top Of Page
Snitz Forums 2000