Rank: Advanced Member
Groups: Moderators, Approved Joined: 4/23/2020(UTC) Posts: 159  Thanks: 46 times Was thanked: 21 time(s) in 17 post(s)
|
Originally Posted by: lyscop  Originally Posted by: Rob 
Code:if(wheel.Window.Process.MainModule.ModuleName == "chrome.exe" || wheel.Window.Process.MainModule.ModuleName == "notepad++.exe") {
if(parseInt(wheel.Y) <= (parseInt(wheel.Window.Rectangle.Top) + 64)) {//is the mouse in the top 64 pixel area of the window?
wheel.Window.BringToFront();
if(wheel.Delta > 0) {
//mouse wheel scrolled up
sp.SendKeys("^{TAB}");
} else {
//mouse wheel scrolled down
sp.SendKeys("^+{TAB}");
}
} else if(wheel.X >= (parseInt(wheel.Window.Rectangle.Right) - 25)) { //is the mouse along the right side of the window?
wheel.Window.BringToFront();
if(wheel.Delta > 0) {
//scroll up, send CTRL+Home to go to the top of the page
sp.SendKeys("^{HOME}");
} else {
//scroll up, send CTRL+End to go to the end of the page
sp.SendKeys("^{END}");
}
} else if(wheel.Window.Process.MainModule.ModuleName == "chrome.exe" && wheel.X <= (parseInt(wheel.Window.Rectangle.Left) + 20)) {
wheel.Window.BringToFront();
if(wheel.Delta > 0){
//scroll up, send CTRL+Home to go to the top of the page
sp.SendKeys("{F5}");
} else {
//scroll up, send CTRL+End to go to the end of the page
sp.SendVKey(vk.BROWSER_BACK);
}
} else {
//Default, pass mouse wheel message onto the original control
//wnd.PostMessageObj(0x020A, wheelTickVars.WParam, wheelTickVars.LParam);
//sp.MouseWheel(wheel.Point, false, wheel.Delta);
wheel.Control.PostMessage(host.cast(uint, 0x020A), new IntPtr(wheel.WParam), new IntPtr(wheel.LParam));
}
} else {
//Default, pass mouse wheel message onto the original control
//wnd.PostMessageObj(0x020A, wheelTickVars.WParam, wheelTickVars.LParam);
//sp.MouseWheel(wheel.Point, false, wheel.Delta);
//wheel.Control.PostMessage(host.cast(uint, 0x020A), new IntPtr(wheel.WParam), new IntPtr(wheel.LParam));
//wheel.Control.PostMessage(host.cast(uint, 0x020A), new IntPtr(0x00780000+0x08), new IntPtr(wheel.Y << 16 + wheel.X)); - control+wheel
wheel.Control.PostMessage(host.cast(uint, 0x020A), new IntPtr(wheel.WParam), new IntPtr(wheel.LParam));
}
Dear Rob, I am here to disturb you again. This script in the S+Net is useful, but I find a problem in my Win10 today. It works well in any program screen, except the original vision of the windows taskbar, if I open the mouse wheel script in Global Action. As the following photo, when I click the Start Menu and the Message Button, the new screen will popup, but I can not use my mouse wheel to scroll up/down.
Can you help me?
It is done. I find the answer in this post https://forum.strokesplus.net/po...t6042-system-volume-helpUse this instead of default wheel function, pass mouse wheel message onto the original control sp.MouseWheel(wheel.Point, wheel.Horizontal, wheel.Delta);
|