Code: Select all
#singleinstance force
wheeling := 0
WheelUp::
WheelDown::
if (!wheeling)
{
wheeling := 1
SetTimer Wheely, 200
}
else
{
wheeling := 0
SetTimer Wheely, Off
}
Wheely:
MouseClick %A_ThisHotkey%
Code: Select all
#singleinstance force
wheeling := 0
WheelUp::
WheelDown::
if (!wheeling)
{
wheeling := 1
SetTimer Wheely, 200
}
else
{
wheeling := 0
SetTimer Wheely, Off
}
Wheely:
MouseClick %A_ThisHotkey%
Code: Select all
#NoEnv
#SingleInstance, Force
bWheel := False
Period := 250
Return ; end of auto-execute section
WheelUp:: ; start auto-scrolling
WheelDown:: ; start auto-scrolling
bWheel := True
Key := A_ThisHotkey
SetTimer, Wheeler, %Period%
Return
Wheeler: ; timer controlled
ToolTip, %Period%, 0, 0
Send, {%Key%}
Return
#If bWheel ; context
Esc:: ; stop auto-scrolling
bWheel := False
ToolTip ; off
SetTimer, Wheeler, Off
Return
NumpadAdd:: ; go faster
If (Period -= 50) < 50
Period := 50
SetTimer, Wheeler, %Period%
Return
NumpadSub:: ; go slower
If (Period += 50) > 1000
Period := 1000
SetTimer, Wheeler, %Period%
Return
#If ; end of context
Code: Select all
#NoEnv
#SingleInstance, Force
bWheel := False
Period := 250
Return ; end of auto-execute section
Wheeler: ; timer controlled
ToolTip, %Period%, 0, 0
Send, {%Key%}
Return
;-------------------------------------------------------------------------------
#If Not bWheel ; context
;-------------------------------------------------------------------------------
WheelUp:: ; start auto-scrolling
WheelDown:: ; start auto-scrolling
bWheel := True
Key := A_ThisHotkey
SetTimer, Wheeler, %Period%
Return
;-------------------------------------------------------------------------------
#If bWheel ; other context
;-------------------------------------------------------------------------------
WheelUp::
WheelDown::
If (Key = A_ThisHotkey) { ; same direction -> go faster
If (Period -= 50) < 50
Period := 50
} Else ; other direction -> go slower
If (Period += 50) > 1000
Period := 1000
SetTimer, Wheeler, %Period%
Return
Esc:: ; stop auto-scrolling
bWheel := False
ToolTip ; off
SetTimer, Wheeler, Off
Return
;-------------------------------------------------------------------------------
#If ; end of context
;-------------------------------------------------------------------------------
Code: Select all
; AutoScroll.ahk attempt#3
#NoEnv
#SingleInstance, Force
bWheel := False
Period := 250
Return ; end of auto-execute section
Wheeler: ; timer controlled
ToolTip, %Period%, 0, 0
Send, {%Key%}
Return
;-------------------------------------------------------------------------------
#If Not bWheel ; context
;-------------------------------------------------------------------------------
WheelUp:: ; start auto-scrolling
WheelDown:: ; start auto-scrolling
bWheel := True
Key := A_ThisHotkey
SetTimer, Wheeler, %Period%
Return
;-------------------------------------------------------------------------------
#If bWheel ; other context
;-------------------------------------------------------------------------------
WheelUp::
WheelDown::
If (Key = A_ThisHotkey) { ; same direction -> go faster
If (Period -= 50) < 50
Period := 50
} Else ; other direction -> go slower
If (Period += 50) > 500 {
bWheel := False
ToolTip ; off
Period := "Off"
}
SetTimer, Wheeler, %Period%
Return
Esc:: ; stop auto-scrolling
bWheel := False
ToolTip ; off
SetTimer, Wheeler, Off
Return
;-------------------------------------------------------------------------------
#If ; end of context
;-------------------------------------------------------------------------------
Code: Select all
#NoEnv
#SingleInstance, Force
bWheel := False
Period := 700
Return ; end of auto-execute section
WheelUp:: ; start auto-scrolling
WheelDown:: ; start auto-scrolling
bWheel := True
Key := A_ThisHotkey
SetTimer, Wheeler, %Period%
Return
Wheeler: ; timer controlled
ToolTip, %Period%, 0, 0
Send, {%Key%}
Return
#If bWheel ; context
Esc:: ; stop auto-scrolling
bWheel := False
ToolTip ; off
SetTimer, Wheeler, Off
Return
NumpadAdd:: ; go faster
If (Period -= 50) < 50
Period := 50
SetTimer, Wheeler, %Period%
Return
NumpadSub:: ; go slower
If (Period += 50) > 1000
Period := 1000
SetTimer, Wheeler, %Period%
Return
#If ; end of context