Hello
I am familiar with the function "KIllprocess".
But you need to specify constantly a specific process for closing.
Now I have a script for each process. Inconvenient.
Tell me please. A script to close any process whose window is currently active.
Example.
The active window is Chrome. Launched the script - Chrome closed.
Next is the active Calculator window. Launched the script - Calculator is closed.
Kill any active process
Moderators: Dorian (MJT support), JRL
Re: Kill any active process
You want these three functions.
GetActiveWindow>
GetWindowProcess>
KillProcess>
Or if closing the window closes the process you could also just write a script that presses ALT + F4. Or manually press ALT + F4 rather than bothering with a script.
Press ALT
Press f4
Release ALT
GetActiveWindow>
GetWindowProcess>
KillProcess>
Or if closing the window closes the process you could also just write a script that presses ALT + F4. Or manually press ALT + F4 rather than bothering with a script.
Press ALT
Press f4
Release ALT
Re: Kill any active process
Brilliant!JRL wrote: ↑Fri Dec 11, 2020 9:06 pmYou want these three functions.
GetActiveWindow>
GetWindowProcess>
KillProcess>
Or if closing the window closes the process you could also just write a script that presses ALT + F4. Or manually press ALT + F4 rather than bothering with a script.
Press ALT
Press f4
Release ALT
As I myself did not guess
Thank you!