AutoHotkey: Keyboard navigation for Background Transfer Manager: Difference between revisions
Jump to navigation
Jump to search
m (Added category AutoHotkey scripts) |
m (Note: old, function is now internally integrated into TC) |
||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
; // => http://www.ghisler.ch/wiki/index.php?title=AutoHotkey:_Keyboard_navigation_for_Background_Transfer_Manager | ; // => http://www.ghisler.ch/wiki/index.php?title=AutoHotkey:_Keyboard_navigation_for_Background_Transfer_Manager | ||
/* --> | /* --> | ||
'''Old/outdated''': <br> | |||
TC has integrated Tab functionality internally since at least version 7.56a, so this script is not needed any more. | |||
'''This script does not work with TC 7.50 and above,''' due to the missing window class name of BTM there. <br> | |||
<!-- | <!-- | ||
*/ ; --> <code><pre> | */ ; --> <code><pre> | ||
; //////////////////////////////////////////////////////////////////////////// | ; ///////////////////////////////////////////////////////////////////////////////// | ||
; // TC_BTM_keyboard-navigation.ahk (W) StatusQuo 2008 for TC 7. | ; // TC_BTM_keyboard-navigation.ahk (W) StatusQuo 2008 for TC 7.0x (up to 7.04a) | ||
; // | ; // | ||
; // adds keyboard navigation to background transfer manager: | ; // adds keyboard navigation to background transfer manager: | ||
; // (Shift+)TAB, Del | ; // (Shift+)TAB, Del | ||
; //////////////////////////////////////////////////////////////////////////// | ; ///////////////////////////////////////////////////////////////////////////////// | ||
#SingleInstance, Force | #SingleInstance, Force |
Latest revision as of 15:10, 28 November 2016
Old/outdated:
TC has integrated Tab functionality internally since at least version 7.56a, so this script is not needed any more.
This script does not work with TC 7.50 and above, due to the missing window class name of BTM there.
; /////////////////////////////////////////////////////////////////////////////////
; // TC_BTM_keyboard-navigation.ahk (W) StatusQuo 2008 for TC 7.0x (up to 7.04a)
; //
; // adds keyboard navigation to background transfer manager:
; // (Shift+)TAB, Del
; /////////////////////////////////////////////////////////////////////////////////
#SingleInstance, Force
asControlNames := "ListBox1,Button1,Button2,Button3,Button4,Edit1,ListBox1"
Return
#IfWinActive, ahk_class DOWNDLGLIST2
Del:: ; === Remove selected download job(s)
Send, {NumpadSub}
Return
Tab:: ; === Focus next control in %asControlNames%
ControlGetFocus, sFocus
sLastControl := ""
Loop, Parse, asControlNames, `,
{
if (sFocus = "") ; no focus at all
{
ControlFocus, ListBox1
Break
}
if (sLastControl = sFocus)
{
ControlFocus, %A_LoopField%
Break
}
sLastControl := A_LoopField
}
Return
+Tab:: ; === Focus previous control in %asControlNames%
ControlGetFocus, sFocus
sLastControl := ""
Loop, Parse, asControlNames, `,
{
if (sFocus = "") ; no focus at all
{
ControlFocus, ListBox1
Break
}
if (A_LoopField = sFocus)
and (sLastControl != "")
{
ControlFocus, %sLastControl%
Break
}
sLastControl := A_LoopField
}
Return
#IfWinActive
;
Back to AutoHotkey