Quantcast UltraNav Middle Click Button & Scroll - Page 2

+ Reply to Thread
Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 40
  1. #11
    Newbie
    Join Date
    Mar 2010
    Posts
    1
    Rep Power
    0

    Default Re: UltraNav Middle Click Button & Scroll

    Quote Originally Posted by aznguyphan View Post
    Note sure if anyone still cares about this, but I wanted to do exactly what MidnightSun does and I have a sort of a working solution. It's a bit long winded and...improvised but it works.

    If you just want to run a script exe then download the attachment, unzip it to a place of your preference and add a shortcut to it in your Startup folder.
    Thanks.the msscroll.exe does well , but it has a little bug. when midbtn focused on a new window , it still move the old window's scollbar. when changing window, it should first switch focus then to scroll, I think that is better. how about you ,thanks again.

  2. #12
    Notebook Evangelist
    Join Date
    Sep 2009
    Posts
    516
    Rep Power
    11

    Default Re: UltraNav Middle Click Button & Scroll

    I've noticed that...and...well that's it xD, I have no idea how to interact with windows that are not the focused window.

    I know the Lenovo's drivers are able to do it, but hey...that's why we pay them isn't it =P.

    Now, if you want to edit the script so that it middle clicks first and then scrolls when you hold it down, that'll change the focus for you. But this will cause accidental link clicks when you're scrolling a web page. I don't know how to change a focus window without a click of some sort.

  3. #13
    Notebook Consultant
    Join Date
    Dec 2009
    Posts
    101
    Rep Power
    9

    Default Re: UltraNav Middle Click Button & Scroll

    Quote Originally Posted by aznguyphan View Post
    Uploaded a Autohotkey compiled script in previous post, you no longer have to have Autohotkey installed unless you want to adjust the script for your own preference
    Updated the code so that horizontal scrolling works better...Did I say I wasn't going to worry about it? Well it was actually simple and with that attitude I wouldn't of had this script in the first place =D.

    Also made it so that it only either scrolls horizontally or vertically and not both at once, felt this was needed for control since my settings have it so sensitive to movement.

    Code:
    $*MButton::
    
    Hotkey, $*MButton Up, MButtonup, off
    KeyWait, MButton, T0.2
    If ErrorLevel = 1
    {
    	Hotkey, $*MButton Up, MButtonup, on
    	MouseGetPos, ox, oy
     	SetTimer, WatchTheMouse, 5
    	SystemCursor("Toggle")
    }
    Else
    	Send {MButton}
    return
    
    MButtonup:
    Hotkey, $*MButton Up, MButtonup, off
    SetTimer, WatchTheMouse, off
    SystemCursor("Toggle")
    return
    
    WatchTheMouse:
    MouseGetPos, nx, ny
    dy := ny-oy
    dx := nx-ox
    If (dx**2 > 0 and dx**2>dy**2) ;edit 4 for sensitivity (changes sensitivity to movement)
    {
    	times := Abs(dy)/1 ;edit 1 for sensitivity (changes frequency of scroll signal)
    	Loop, %times%
    	{
    		If (dx > 0)
    			Click WheelRight
    		Else
    			Click WheelLeft
       	}
    }
    If (dy**2 > 0 and dy**2>dx**2) ;edit 0 for sensitivity (changes sensitivity to movement)
    {
    	times := Abs(dy)/1 ;edit 1 for sensitivity (changes frequency of scroll signal)
    	Loop, %times% 
    	{
    		If (dy > 0)
    			Click WheelDown
    		Else
    			Click WheelUp
    	}   
    }
    MouseMove ox, oy
    return
    
    SystemCursor(OnOff=1)   ; INIT = "I","Init"; OFF = 0,"Off"; TOGGLE = -1,"T","Toggle"; ON = others
    {
        static AndMask, XorMask, $, h_cursor
            ,c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13 ; system cursors
            , b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13   ; blank cursors
            , h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11,h12,h13   ; handles of default cursors
        if (OnOff = "Init" or OnOff = "I" or $ = "")       ; init when requested or at first call
        {
            $ = h                                          ; active default cursors
            VarSetCapacity( h_cursor,4444, 1 )
            VarSetCapacity( AndMask, 32*4, 0xFF )
            VarSetCapacity( XorMask, 32*4, 0 )
            system_cursors = 32512,32513,32514,32515,32516,32642,32643,32644,32645,32646,32648,32649,32650
            StringSplit c, system_cursors, `,
            Loop %c0%
            {
                h_cursor   := DllCall( "LoadCursor", "uint",0, "uint",c%A_Index% )
                h%A_Index% := DllCall( "CopyImage",  "uint",h_cursor, "uint",2, "int",0, "int",0, "uint",0 )
                b%A_Index% := DllCall("CreateCursor","uint",0, "int",0, "int",0
                    , "int",32, "int",32, "uint",&AndMask, "uint",&XorMask )
            }
        }
        if (OnOff = 0 or OnOff = "Off" or $ = "h" and (OnOff < 0 or OnOff = "Toggle" or OnOff = "T"))
            $ = b  ; use blank cursors
        else
            $ = h  ; use the saved cursors
    
        Loop %c0%
        {
            h_cursor := DllCall( "CopyImage", "uint",%$%%A_Index%, "uint",2, "int",0, "int",0, "uint",0 )
            DllCall( "SetSystemCursor", "uint",h_cursor, "uint",c%A_Index% )
        }
    }
    copy this into notepad, rename it to ahk, then put it in startup?

  4. #14
    Notebook Evangelist
    Join Date
    Sep 2009
    Posts
    516
    Rep Power
    11

    Default Re: UltraNav Middle Click Button & Scroll

    Yes, if you want to play with the code. Otherwise just download MScroll.exe

    Make sure to do the registry edit to number of lines per scroll

  5. #15
    Newbie
    Join Date
    Aug 2010
    Posts
    2
    Rep Power
    0

    Default Re: UltraNav Middle Click Button & Scroll

    Old thread, but I wanted to say thank you so much aznguyphan. Your script works great. I like it better than the other solution I found, which is to use Marble Mouse Scroll Wheel. It sets up similarly to your script (set the trackpoint settings to neither), and it probably acts more like the trackpoint's standard scroll, but yours has a better feel and it works smoother on more programs (I've noticed Pidgin and Winamp).

    Also I would like to add that you don't need to edit the registry, you can change the number of lines it scrolls in Window's control panel under mouse.

    Now if only we could figure out how to scroll whichever window the cursor is hovering over, regardless of focus, then it would be perfect.

  6. #16
    Notebook Guru
    Join Date
    Apr 2011
    Location
    Vancouver
    Posts
    70
    Rep Power
    6

    Default Re: UltraNav Middle Click Button & Scroll

    I have been searching for a way to get essentially "trackpoint scrolling = standard" funtionality, but with middle clicking functionality. I don't quite understand everything about MScroll.exe, but I downloaded it and ran it, and I set the trackpoint to neither, and I seem to now have what I want.

    Awesome! Thanks aznguyphan!
    Thinkpad X220 | IPS | i5-2520M | 8GB RAM | 320GB 7200 | Intel 6205 Wifi | Bluetooth | Ultrabase3

  7. #17
    Notebook Consultant
    Join Date
    May 2011
    Posts
    155
    Rep Power
    5

    Default Re: UltraNav Middle Click Button & Scroll

    This is great! IMHO Lenovo should pay you guys and incorporate this into all of the current Thinkpads. Whomever coded this should know that the Thinkpad community is very grateful!

  8. #18
    Notebook Consultant
    Join Date
    Apr 2011
    Posts
    199
    Rep Power
    6

    Default Re: UltraNav Middle Click Button & Scroll

    This Script is amazing! Sorry for the old bump, but could you please clarify how to change the sensitivity? I don't understand the two lines you commented, but I want to decrease the sensitivity for vertical scrolling.

  9. #19
    Notebook Guru
    Join Date
    Apr 2008
    Posts
    66
    Rep Power
    13

    Default Re: UltraNav Middle Click Button & Scroll

    Quote Originally Posted by aznguyphan View Post
    Uploaded a Autohotkey compiled script in previous post, you no longer have to have Autohotkey installed unless you want to adjust the script for your own preference
    Updated the code so that horizontal scrolling works better...Did I say I wasn't going to worry about it? Well it was actually simple and with that attitude I wouldn't of had this script in the first place =D.

    Also made it so that it only either scrolls horizontally or vertically and not both at once, felt this was needed for control since my settings have it so sensitive to movement.

    Code:
    $*MButton::
    
    Hotkey, $*MButton Up, MButtonup, off
    KeyWait, MButton, T0.2
    If ErrorLevel = 1
    {
    	Hotkey, $*MButton Up, MButtonup, on
    	MouseGetPos, ox, oy
     	SetTimer, WatchTheMouse, 5
    	SystemCursor("Toggle")
    }
    Else
    	Send {MButton}
    return
    
    MButtonup:
    Hotkey, $*MButton Up, MButtonup, off
    SetTimer, WatchTheMouse, off
    SystemCursor("Toggle")
    return
    
    WatchTheMouse:
    MouseGetPos, nx, ny
    dy := ny-oy
    dx := nx-ox
    If (dx**2 > 0 and dx**2>dy**2) ;edit 4 for sensitivity (changes sensitivity to movement)
    {
    	times := Abs(dy)/1 ;edit 1 for sensitivity (changes frequency of scroll signal)
    	Loop, %times%
    	{
    		If (dx > 0)
    			Click WheelRight
    		Else
    			Click WheelLeft
       	}
    }
    If (dy**2 > 0 and dy**2>dx**2) ;edit 0 for sensitivity (changes sensitivity to movement)
    {
    	times := Abs(dy)/1 ;edit 1 for sensitivity (changes frequency of scroll signal)
    	Loop, %times% 
    	{
    		If (dy > 0)
    			Click WheelDown
    		Else
    			Click WheelUp
    	}   
    }
    MouseMove ox, oy
    return
    
    SystemCursor(OnOff=1)   ; INIT = "I","Init"; OFF = 0,"Off"; TOGGLE = -1,"T","Toggle"; ON = others
    {
        static AndMask, XorMask, $, h_cursor
            ,c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13 ; system cursors
            , b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13   ; blank cursors
            , h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11,h12,h13   ; handles of default cursors
        if (OnOff = "Init" or OnOff = "I" or $ = "")       ; init when requested or at first call
        {
            $ = h                                          ; active default cursors
            VarSetCapacity( h_cursor,4444, 1 )
            VarSetCapacity( AndMask, 32*4, 0xFF )
            VarSetCapacity( XorMask, 32*4, 0 )
            system_cursors = 32512,32513,32514,32515,32516,32642,32643,32644,32645,32646,32648,32649,32650
            StringSplit c, system_cursors, `,
            Loop %c0%
            {
                h_cursor   := DllCall( "LoadCursor", "uint",0, "uint",c%A_Index% )
                h%A_Index% := DllCall( "CopyImage",  "uint",h_cursor, "uint",2, "int",0, "int",0, "uint",0 )
                b%A_Index% := DllCall("CreateCursor","uint",0, "int",0, "int",0
                    , "int",32, "int",32, "uint",&AndMask, "uint",&XorMask )
            }
        }
        if (OnOff = 0 or OnOff = "Off" or $ = "h" and (OnOff < 0 or OnOff = "Toggle" or OnOff = "T"))
            $ = b  ; use blank cursors
        else
            $ = h  ; use the saved cursors
    
        Loop %c0%
        {
            h_cursor := DllCall( "CopyImage", "uint",%$%%A_Index%, "uint",2, "int",0, "int",0, "uint",0 )
            DllCall( "SetSystemCursor", "uint",h_cursor, "uint",c%A_Index% )
        }
    }
    Howdy. Thanks. I have been looking for this for years. I was going to say I didn't realise it would be as simple as an AutoHotkey script, but then also realisd that script does not look that simple

    edit: Also if you have paypal want some beer money then pm me your paypal id

  10. #20
    Notebook Enthusiast
    Join Date
    Apr 2011
    Posts
    23
    Rep Power
    6

    Default Re: UltraNav Middle Click Button & Scroll

    Not sure if anyone still cares but for future reference:

    The UltraNav that came with my x220 has a scrolling type "Auto-select" under trackpoint settings which seems to accomplish what we're after.

 

 
Page 2 of 4 FirstFirst 1234 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -4. The time now is 02:48 PM.
Powered by vBulletin® Version 4.2.0
Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.
SEO by vBSEO 3.6.0