int2

25 Reputation

One Badge

15 years, 131 days

MaplePrimes Activity


These are answers submitted by int2

Thank you for your reply, I have managed to fix the problem by using AutoHotkeys.
Anyone has similar problem can use the following script, but you need to check the lower dark color of the scroll button in your machine and modify the GetScroll function

this script will work on any classic interface, but you need to modify it accordingly


;global variables


scrollBtnX:=0
scrollBtnY:=0
scrollSpeed:=19
scrollRate:=3
scrollCount:=0

GetScroll()
{

global scrollBtnX,scrollBtnY
ControlGetPos, x, y, w, h, ScrollBar1, Maple 13
new_x:=x+5
new_y:=y
count:=0
h:=h+50

;Check out the color, until we meet the right control 646F71, the dark below ec ec
;we need count because there're two box with same color
Loop
{
    new_y:=new_y + 1
    PixelGetColor,color,%new_x%,%new_y%
    ;MsgBox current color %color% at X%new_x%  Y%new_y%   
    if color = 0x878787
    {
        count:=count+1
        ;MsgBox Found!  Count=%count%
        if count=2
        {
            ;MsgBox BGR X%new_x% Y%new_y%
            ;set position
           
            scrollBtnX:=new_x
            scrollBtnY:=new_y - 5
           
            break
        }
    }
   
   
    if new_y > h
    {
        MsgBox Identical Title
        break

    }
       
}
   
}


Down()
{
    global scrollBtnX,scrollBtnY,scrollSpeed

    new_y:=scrollBtnY
    new_x:=scrollBtnX

    ;MsgBox Our target Yay X%new_x% Y%new_y%
    ;Click the mouse and Down
    MouseClick,,new_x,new_y,,0,D
    ;Move the mouse down
    new_y:=new_y + scrollSpeed
    MouseMove,new_x,new_y,0
    MouseClick,,new_x,new_y,,0,U
   
    scrollBtnX:=new_x
    scrollBtnY:=new_y
   
    ;ToolTip,Color`t%color%`tX%new_x%`tY%new_y%`tnew_y%Y%

}

Up()
{
    global scrollBtnX,scrollBtnY,scrollSpeed
   
    if (scrollBtnY=0)
    {
        ;MsgBox less than 0   
        return
    }

    new_y:=scrollBtnY
    new_x:=scrollBtnX

    ;MsgBox Our target Yay X%new_x% Y%new_y%
    ;Click the mouse and Down
    MouseClick,,new_x,new_y,,0,D
    ;Move the mouse down
    new_y:=new_y - scrollSpeed
   
    if (new_y < 0)
        new_y:=0
    MouseMove,new_x,new_y,0
    MouseClick,,new_x,new_y,,0,U
   
    scrollBtnX:=new_x
    scrollBtnY:=new_y
   
    ;ToolTip,Color`t%color%`tX%new_x%`tY%new_y%`tnew_y%Y%

}

Accelerate()
{
    global scrollSpeed,scrollCount,scrollRate
    scrollCount:=scrollCount + 1
    scrollSpeed:=scrollSpeed + (scrollCount^5)/scrollRate
   
}

Decelerate()
{
    global scrollSpeed,scrollCount
    scrollCount:=0
    scrollSpeed:=17
}

#MaxThreadsBuffer on
#ifWinActive, Maple 13
WheelDown::   

    if (scrollBtnX = 0 && scrollBtnY=0)
    {
        GetScroll()
        Down()
    }

    if(A_ThisHotKey = A_PriorHotKey && A_TimeSincePriorHotkey < 470)
    {
       
        Down()   
    }
    else
    {
       
        GetScroll()
        Down()
    }


return


WheelUp::
    if (scrollBtnX = 0 && scrollBtnY=0)
    {
        GetScroll()
        Up()       
    }
   
    if(A_ThisHotKey = A_PriorHotKey && A_TimeSincePriorHotkey < 470)
    {
       
        Up()   
    }
    else
    {
       
        GetScroll()
        Up()
    }
return
#ifWinActive



 

Page 1 of 1