DragToScroll - updated

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
Drugwash
Posts: 850
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania
Contact:

Re: DragToScroll - updated

16 Dec 2017, 14:02

Yes, it would be, for right-click. Maybe a button combination like right-left click (but that may interfere with Total Commander's 'move' function).
Thing is, right-click is the standard context menu button in all applications so it may present an issue by default; other applications - as you noticed yourself - employ their own scrolling routine on middle-click; and left-click is, well, too complicated. Adding mouse gestures to that - see here QtWeb's default gestures, for example - it all becomes a mess.
One workaround would be to use a whitelist or a blacklist, to allow - or deny - the script based on currently focused application. (I see there's already an option to disable scrolling based on application/process in 'App specific settings')
Honestly I can't think of a safe overall solution right now. And I too am using two very old mice (Logitech M-S35) without scroll wheel so this kind of script would prove useful.
Last edited by Drugwash on 16 Dec 2017, 14:10, edited 1 time in total.
Part of my AHK work can be found here.
User avatar
boiler
Posts: 16767
Joined: 21 Dec 2014, 02:44

Re: DragToScroll - updated

16 Dec 2017, 14:04

Was also just about to suggest left and right click together, although that wouldn't be possible to do on a touchpad, and that's where I'd really like to be able to use this. But a control + right click or something like that would work.
fenchai
Posts: 292
Joined: 28 Mar 2016, 07:57

Re: DragToScroll - updated

16 Dec 2017, 21:53

I have to say those last 2 lines made the script perfect.

Now it's just the Cursor icon, no matter what Icon I choose, it converts it into a tiny little icon...

Can you make it bigger? You said it was just a gui, I may be able to check the size in the script, will update if I do.

I just added w35 h-1 in the Gui settings. and changed the icon into a .png file now the cursor looks cool :D
guest3456
Posts: 3454
Joined: 09 Oct 2013, 10:31

Re: DragToScroll - updated

16 Dec 2017, 23:19

fenchai wrote: Now it's just the Cursor icon, no matter what Icon I choose, it converts it into a tiny little icon...

Can you make it bigger? You said it was just a gui, I may be able to check the size in the script, will update if I do.

I just added w35 h-1 in the Gui settings. and changed the icon into a .png file now the cursor looks cool :D
If adding the w/h worked, thats great. I was gonna suggest removing the 0x3 in the picture options:

https://github.com/mmikeww/DragToScroll ... l.ahk#L266

what .png did you end up using? can you link it?

fenchai
Posts: 292
Joined: 28 Mar 2016, 07:57

Re: DragToScroll - updated

17 Dec 2017, 11:37

guest3456 wrote:
fenchai wrote: Now it's just the Cursor icon, no matter what Icon I choose, it converts it into a tiny little icon...

Can you make it bigger? You said it was just a gui, I may be able to check the size in the script, will update if I do.

I just added w35 h-1 in the Gui settings. and changed the icon into a .png file now the cursor looks cool :D
If adding the w/h worked, thats great. I was gonna suggest removing the 0x3 in the picture options:

https://github.com/mmikeww/DragToScroll ... l.ahk#L266

what .png did you end up using? can you link it?
I removed 0x3 but that did not affect the png image at all.

here is the link to the png I used https://www.google.com/search?hl=en-PA& ... 20&bih=900

I chose the 556*720 size.
fenchai
Posts: 292
Joined: 28 Mar 2016, 07:57

Re: DragToScroll - updated

23 Dec 2017, 11:50

Anyone knows how to pause the script or disable the RButton on certain windows on this script?

It does unwanted Right click actions on some programs.
guest3456
Posts: 3454
Joined: 09 Oct 2013, 10:31

Re: DragToScroll - updated

26 Dec 2017, 01:10

fenchai wrote:Anyone knows how to pause the script or disable the RButton on certain windows on this script?

It does unwanted Right click actions on some programs.
i've never tried it, but if you right click the tray icon, and then choose the Settings menu, and then 'App specific settings'

you could try adding your process name or winclass, and then clicking the "Scroll Disabled" checkbox

fenchai
Posts: 292
Joined: 28 Mar 2016, 07:57

Re: DragToScroll - updated

26 Dec 2017, 16:02

guest3456 wrote: i've never tried it, but if you right click the tray icon, and then choose the Settings menu, and then 'App specific settings'

you could try adding your process name or winclass, and then clicking the "Scroll Disabled" checkbox
A User Helped me out, just use settimer to check for window and pause when needed.

Btw, I had a ton of hotkeys for When I am holding RButton... This script is awesome but I missed being able to control RButton + Wheel Down, UP,Left,Right, LButton etc...

Is there a way to customize hotkeys in this same script? It sucks not having the original poster of this awesome script here but We may figure something out to perfect this script.

The Rbutton Left, Right, Up & Down Swipes also do not work very reliably. Have you tried them? I try them but it seems to be hit or miss tbh.
guest3456
Posts: 3454
Joined: 09 Oct 2013, 10:31

Re: DragToScroll - updated

26 Dec 2017, 19:56

i do not use the gestures in this script

fenchai
Posts: 292
Joined: 28 Mar 2016, 07:57

Re: DragToScroll - updated

27 Dec 2017, 19:33

guest3456 wrote:i do not use the gestures in this script
So far I added a gosub in the ButtonDown Label

Code: Select all

gosub, StartPhase
And another gosub on ButtonUp Label

Code: Select all

gosub, EndPhase
And This are my Labels

; My Own Modifications

Code: Select all

  StartPhase: ; On Button Down
    SetTimer, Check_for_PressedDown_Keys, 50
    return
  
  EndPhase: ; On Button Up
    gosub, Check_for_PressedDown_Keys_OFF
    ToolTip
    return

  Check_for_PressedDown_Keys_OFF:
    SetTimer, Check_for_PressedDown_Keys, Off
    return

  Check_for_PressedDown_Keys:
    GetKeyState, keystate, LButton
    if keystate = D 
    {
      ToolTip, You just pressed LButton but you can modify this
      gosub, Check_for_PressedDown_Keys_OFF
    } else {
      
    } return
Right now, it only shows a tooltip when I press Rbutton + LButton but I may add more features later. The Concept is there.
Stamimail
Posts: 77
Joined: 06 Nov 2014, 08:48

Re: DragToScroll - updated

20 Jul 2018, 02:36

Hi guest3456,
I just looked for an update for v2.4, and I got here and tested your v2.5.

I looked for a HandTool, but I found a Trackpoint Scrolling...

This is not the same app, and because of that I think you can't call it: DragToScroll (2.5) - updated

If anyone knows an improved HandTool, please let me know.
guest3456
Posts: 3454
Joined: 09 Oct 2013, 10:31

Re: DragToScroll - updated

21 Jul 2018, 08:08

Stamimail wrote:Hi guest3456,
I just looked for an update for v2.4, and I got here and tested your v2.5.

I looked for a HandTool, but I found a Trackpoint Scrolling...

This is not the same app, and because of that I think you can't call it: DragToScroll (2.5) - updated

If anyone knows an improved HandTool, please let me know.
Lol. Are you really claiming its not the same script simply because of the cursor icon style change? Save the nonsense bud.

Just read the code and change one line of the settings. You can have the old 'hand' style cursor if you want:

https://github.com/mmikeww/DragToScroll ... l.ahk#L141

Stamimail
Posts: 77
Joined: 06 Nov 2014, 08:48

Re: DragToScroll - updated

23 Jul 2018, 23:49

guest3456 wrote:Are you really claiming its not the same script simply because of the cursor icon style change?
Perhaps it's the same script, but it's not the same app, as long as there is no way to change those settings via the GUI.
Thank you for pointing to the relevant settings at the code. I'll try to use my beginner skills to edit this.
sm0ke_d
Posts: 2
Joined: 14 Jun 2021, 13:40
Contact:

Re: DragToScroll - updated

14 Jun 2021, 13:48

Can you please add the setting that allow program works like i hold left mouse button on scrollbar? I made config to use MButton.
So i want to when i click and hold middle mouse button on window program rebind it like i click and hold left mouse button on scrollbar of that window. And when i drag it scrolls.
Because in current setting i have to move some distance to make it work so its not smooth. Its works with ranges and jumps. This is bad.
guest3456
Posts: 3454
Joined: 09 Oct 2013, 10:31

Re: DragToScroll - updated

14 Jun 2021, 14:37

sm0ke_d wrote:
14 Jun 2021, 13:48
Can you please add the setting that allow program works like i hold left mouse button on scrollbar? I made config to use MButton.
So i want to when i click and hold middle mouse button on window program rebind it like i click and hold left mouse button on scrollbar of that window. And when i drag it scrolls.
Because in current setting i have to move some distance to make it work so its not smooth. Its works with ranges and jumps. This is bad.
try tweaking the settings at the top of the script

sm0ke_d
Posts: 2
Joined: 14 Jun 2021, 13:40
Contact:

Re: DragToScroll - updated

15 Jun 2021, 02:24

guest3456 wrote:
14 Jun 2021, 14:37
sm0ke_d wrote:
14 Jun 2021, 13:48
Can you please add the setting that allow program works like i hold left mouse button on scrollbar? I made config to use MButton.
So i want to when i click and hold middle mouse button on window program rebind it like i click and hold left mouse button on scrollbar of that window. And when i drag it scrolls.
Because in current setting i have to move some distance to make it work so its not smooth. Its works with ranges and jumps. This is bad.
try tweaking the settings at the top of the script
Please tell me what settings i should put?
guest3456
Posts: 3454
Joined: 09 Oct 2013, 10:31

Re: DragToScroll - updated

15 Jun 2021, 08:39

sm0ke_d wrote:
15 Jun 2021, 02:24
Please tell me what settings i should put?
i dont know but there should be descriptions explaining each one

jjsmcneil
Posts: 1
Joined: 08 Mar 2022, 19:50

Re: DragToScroll - updated

08 Mar 2022, 19:58

Hi,

I tried to switch the hotkey "button" from the mouse Rbutton to the keyboard Rshift or Rctrl buttons, but the "scroll" aborts only after 1-2 seconds , even though I continue to hold down the Rshift or Rctrl keyboard buttons.

Actually even better for my use case, would be if the "Scroll" could be toggled into an "ON" state or "OFF" state, by pressing the hotkey button (or a "sticky" hotkey), as I need to scroll through thousands of images using an image stack viewer- its difficult to keep the right mouse button down while dragging the mouse over the length of the mousepad for several minutes.

also, when I change the hotkey to "Lbutton" (the left mouse button), the "scroll" simply does not happen at all -- the mouse cursor does not change nor does the scroll initiate even with the left mouse button held clicked down.

thank so much.

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: KruschenZ and 102 guests