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

Notification

Icon
Error

Options
Go to last post Go to first unread
Strobiker  
#1 Posted : Wednesday, October 16, 2019 7:07:15 PM(UTC)
Strobiker

Rank: Member

Reputation:

Groups: Approved
Joined: 10/15/2019(UTC)
Posts: 10

Thanks: 2 times
Hi Rob,
back in the day you wrote a script for me so that one can jump to the top or bottom of a page by moving the mouse to the right of the screen and then scroll.
It is a CTRL+Pos1 shortcut needed.
I have grown really accustomed to that and love to have it back.
Thanks,
Felix
Rob  
#2 Posted : Wednesday, October 16, 2019 7:23:45 PM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,349
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 416 time(s) in 354 post(s)
I have this in my Global Actions > Mouse Events > Mouse Wheel Script:
Code:
if(wheel.Window.Title.indexOf("- Google Chrome") > -1 || wheel.Window.Title.indexOf("- Notepad++") > -1) {
    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 {
        sp.MouseWheel(wheel.Point, false, wheel.Delta);
    }
} else {
    sp.MouseWheel(wheel.Point, false, wheel.Delta);
}

If changes tabs (for Chrome and Notepad++) when you scroll at the top of the screen, and sends Ctrol+Home or Ctrl+End if you scroll on the right side, and scroll up on the left side sends F5 to refresh, down goes back.

You can change as you need, of course.
thanks 1 user thanked Rob for this useful post.
cfonly on 5/12/2021(UTC)
chilled  
#3 Posted : Tuesday, December 17, 2019 12:31:09 AM(UTC)
chilled

Rank: Newbie

Reputation:

Groups: Approved
Joined: 12/16/2019(UTC)
Posts: 4

Originally Posted by: Rob Go to Quoted Post
I have this in my Global Actions > Mouse Events > Mouse Wheel Script:
Code:
if(wheel.Window.Title.indexOf("- Google Chrome") > -1 || wheel.Window.Title.indexOf("- Notepad++") > -1) {
    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 {
        sp.MouseWheel(wheel.Point, false, wheel.Delta);
    }
} else {
    sp.MouseWheel(wheel.Point, false, wheel.Delta);
}

If changes tabs (for Chrome and Notepad++) when you scroll at the top of the screen, and sends Ctrol+Home or Ctrl+End if you scroll on the right side, and scroll up on the left side sends F5 to refresh, down goes back.

You can change as you need, of course.


I opened the latest version of the program and turned on the global scroll wheel mode you mentioned here. Instantly the browser felt like flying.
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.