I'm working on grouping the window title based on the progam that is running.
/* Alter the value of "shorten" below to change where characters are removed from the title 1 = remove from right 2 = remove from middle 3 = don't remove any characters Alter the value of "shorten_length" below to specify how many characters long you would like the menu times to be. */ shorten=1 shorten_length=35 del= ~MButton:: if del <> menu, tabs, DeleteAll del++ index=0 WinGet, WinList, List,,,Program Manager WinGet, active_titleid, Id, A loop, %WinList% { StringTrimRight, element, WinList%a_index%, 0 if element = break WinGetTitle, title, ahk_id %element% StringLen, title_len, title if title_len >= %shorten_length% { if shorten=1 { no_char_to_remove=%title_len% no_char_to_remove-=%shorten_length% StringTrimRight, title, title, %no_char_to_remove% title=%title%... } if shorten=2 { no_char_to_remove=%title_len% no_char_to_remove-=%shorten_length% half_remove=%no_char_to_remove% half_remove/=2 half_len=%title_len% half_len/=2 half_len-=%half_remove% StringMid, to_replace, title, %half_len%, %no_char_to_remove% StringReplace, title, title, %to_replace%, ... } } if title<> { index++ if active_titleid=%element% { menu, tabs, add, %index%) *%title%, activate } else { menu, tabs, add, %index%) %title%, activate } item%index%=%element% } } menu, tabs, add, menu, tabs, add, Show Desktop, desktop MouseGetPos, X, Y Menu, tabs,Show, %x%, %y% return activate: loop, %A_ThisMenuItemPos% { StringTrimRight, id, item%a_index%, 0 } winactivate, ahk_id %id% menu, tabs, deleteall return desktop: WinMinimizeAll return