I am new to AHK and would like to write a script that check if process cmd.exe is exist.
if not exist, then popup a msgbox: "cmd not existed!"
if exist, then kill\close cmd.exe process and popup a msgbox: "cmd killed!"
what am I doing wrong ?
Code: Select all
IfProcessExist, cmd.exe
{
msgbox, cmd not existed!
exit
}
else
Process,Close,cmd.exe
msgbox, cmd killed!
return