I created this post because I couldn't comment on @PBeezy response to this question, and his answer for terminating a specific script does not work for me. He suggests doing:
wmic process where "commandline like '%%MyScript.ahk'" delete
However when I do this I get: No Instance(s) Available
and the script doesn't close. I have substituted MyScript
for the name of my ahk script. Any help would be greatly appreciated.