Skip to content

Instantly share code, notes, and snippets.

@fabiofortkamp
Created September 25, 2019 17:13
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 fabiofortkamp/75aed33d3af27828234c691621b9e02c to your computer and use it in GitHub Desktop.
Save fabiofortkamp/75aed33d3af27828234c691621b9e02c to your computer and use it in GitHub Desktop.
AutoHotKey script to close window whose name is passed on as argument
; This script closes the window name passed as argument, e.g.
; AutoHotkey.exe closewindow.ahk "Visual Studio Code"
; To match strings anywhere in the window title
SetTitleMatchMode 2
If (WinExist(A_Args[1]))
WinClose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment