StrokesPlus.net
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
IvanYH  
#1 Posted : Sunday, June 28, 2020 8:53:56 PM(UTC)
IvanYH

Rank: Newbie

Reputation:

Groups: Approved
Joined: 6/28/2020(UTC)
Posts: 2
Bulgaria
Location: Sofia

when i enable mouse wheel event and use this(default script):
//This is a script I use, but figured I'd leave it for example purposes

if(( wheel.Window.Process.MainModule.ModuleName == "chrome.exe" || wheel.Window.Process.MainModule.ModuleName == "notepad++.exe" || wheel.Window.Process.MainModule.ModuleName == "netbeans64.exe")) {
if(parseInt(wheel.Y) <= (parseInt(wheel.Window.Rectangle.Top) + 64)) {//is the mouse in the top 64 pixel area of the window?
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?
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)) {
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
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
wheel.Control.PostMessage(host.cast(uint, 0x020A), new IntPtr(wheel.WParam), new IntPtr(wheel.LParam));
}

Google chrome starts to change tabs many times not one , probably the event is not consumed correctly and is repeated several times?
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.