Skip to content

Instantly share code, notes, and snippets.

@Pagliacii
Created February 9, 2021 07:29
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 Pagliacii/0b70ccf3b948b470e81f60c74cee4a98 to your computer and use it in GitHub Desktop.
Save Pagliacii/0b70ccf3b948b470e81f60c74cee4a98 to your computer and use it in GitHub Desktop.
This function checks if the specified name process exists and returns the unique ID (HWND) of the first matching window.
processExist(name) {
DetectHiddenWindows, On
existed := WinExist("ahk_exe" name)
DetectHiddenWindows, Off
Return existed
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment