Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

fast and concise Window-Switcher(-Activator, -Manager)


  • Please log in to reply
2 replies to this topic
schlemihl1277
  • Members
  • 10 posts
  • Last active: Sep 28 2005 08:22 PM
  • Joined: 09 Jul 2005
Hi Community,

I have the need to zap fast between different open program-windows including clusters of same-application-windows. It is important for me to use ONLY the keyboard and NOT the mouse (concerning speed). If there are running several instances of one application, "Ctrl+F6" does not work. And using "Alt+Tab" shows only one window-title at one time. So I wrote this concise Window-Switcher(-Activator). I use this script along with HotKeyBind (http://hotkeybind.sourceforge.net/). Perhaps some people need such a small simple tool too:

setkeydelay, 10
hotkey, ESC, end
settitlematchmode, 2
winget, wind, List,,,Program Manager
loop
{
num := A_Index + 1
stringtrimleft, hwnd, wind%num%, 0
if hwnd =
	break
wingettitle, title, ahk_id %hwnd%
stringlen, length, title
if length > 105
	stringtrimright, title, title, (length - 105)
list = %list%%A_Index%: %title%`n`n
}
inputbox, num, Window-Activator: To activate a Window enter Window-Number and press return! Leave by pressing "ESC"!, %list%,,700,700,,,,,1
if errorlevel = 1
	goto, end
loop, parse, list, `n
{
stringsplit, string, A_LoopField, :
stringreplace, title, A_LoopField, %string1%:%A_Space%
if string1 = %num%
	break
}
winactivate, %title%
end:
exitapp

Best regards,

schlemihl1277

dijiyd
  • Members
  • 87 posts
  • Last active: Oct 22 2005 01:29 PM
  • Joined: 31 Mar 2004
Hi, and welcome. I just want to point you to a similar script here if you want to take a look. It might be useful to you too. (although not as concise)

schlemihl1277
  • Members
  • 10 posts
  • Last active: Sep 28 2005 08:22 PM
  • Joined: 09 Jul 2005
Hi dijiyd,

Thank you for your follow-up-posting. I am sorry, but I cannot launch the alternative scripts you linked for me. Perhaps the reason is my german Windows-Version.

schlemihl1277