Vocola.net
Vocola 3.1 Function Library
SwitchToButtonNumber(buttonNumber)
Namespaces LibraryTaskBar ► SwitchToButtonNumber
Activates the window associated with a specified taskbar button.
Syntax
SwitchToButtonNumber(buttonNumber)
Parameters
buttonNumber
Number of the desired taskbar button. Positive numbers count forward from the first taskbar button, while negative numbers count backward from the last taskbar button.
Examples
CopySwitch to a window by taskbar number
Use 1..9 = TaskBar.SwitchToButtonNumber($1);
If Microsoft Word is the third item in the taskbar, saying "Use 3" brings it into the foreground.
CopyClose a window by taskbar number
Close 1..9 Right = TaskBar.SwitchToButtonNumber(-$1) {Alt+F4};
If Notepad is the last item in the taskbar, saying "Close 1 Right" brings it into the foreground by calling SwitchToButtonNumber(-1) and then closes it by sending the keystroke {Alt+F4}.

Assembly: VocolaFunctionLibrary (Module: VocolaFunctionLibrary) Version: 3.1.1.0 (3.1.1.0)