Skip to content

Instantly share code, notes, and snippets.

@emisjerry
Created September 29, 2019 07:12
Show Gist options
  • Save emisjerry/9fcbaf251434c8a9c38b8ae84c106469 to your computer and use it in GitHub Desktop.
Save emisjerry/9fcbaf251434c8a9c38b8ae84c106469 to your computer and use it in GitHub Desktop.
由零開始寫一次關閉多個同名程式的 AutoHotkey腳本(AHK #10)
#SingleInstance Force
SetTitleMatchMode 2
#n::
run notepad
Return
^!f4::
WinGetTitle sTitle, A
; MsgBox %sTitle%
; InputBox, OutputVar [, Title, Prompt, HIDE, Width, Height, X, Y, Font, Timeout, Default]
InputBox sTitle, 視窗標題, 請輸入視窗的標題文字, , 300, 150, , , , , %sTitle%
if (sTitle = "nb") {
sTitle := "記事本" ;; 或用 sTitle = 記事本
} else if (sTitle = "ie") {
sTitle := "Internet Explorer"
}
while WinExist(sTitle)
WinClose
Return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment