Hey guys. I'm not an AHK master by any means but i'm really close to figuring this out but i need just a little more help to complete it. I'm trying to run a script that will send a taskkill command when the Esc key is hit ONLY while a specific program is running so the command isnt always being sent when the Esc key is hit. This is my script so far
Code: Select all
ESC::
{
SetTitleMatchMode, 2
WinActivate, ahk_exe RPCS3.exe
run taskkill /F /IM RPCS3.exe,, Hide
return
}
It works but i'm not sure if it's ONLY doing the taskkill when RPCS3.exe is detected/running or not. I think maybe a Loop might be needed? Any help would be appreciated. Thanks
[Mod edit: Added [code][/code] tags. Please use them yourself when posting code.]