Skip to content

Instantly share code, notes, and snippets.

@10sr
Created March 3, 2010 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 10sr/320798 to your computer and use it in GitHub Desktop.
Save 10sr/320798 to your computer and use it in GitHub Desktop.
開いてるウィンドウをメニューで一覧してアクティブにする。alt+tab代替みたいなもの。
/*
開いてるウィンドウをメニューで一覧してアクティブにする。alt+tab代替みたいなもの。
ifのとこを編集することで除外するものを指定可。
*/
Menu, winlistmenu , Add
Menu, winlistmenu , delete
WinGet, winlist , list ,,, title text which will not exist at %a_now%,
loop,%winlist%
{
StringTrimLeft, winhandle , winlist%A_Index% , 0
WinGetTitle, wintitle , ahk_id %winhandle%
if ( wintitle != "" and wintitle != "スタート" and wintitle != "Program Manager")
Menu, winlistmenu , Add, %wintitle%_%winhandle%, winactivate
}
Menu, winlistmenu , show
return
winactivate:
RegExMatch(A_ThisMenuItem, "^.*_(.*?$)" , thisid )
WinActivate , ahk_id %thisid1%
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment