Detect failed (crashed) processes

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Atom
Posts: 42
Joined: 05 Sep 2016, 06:49

Detect failed (crashed) processes

Post by Atom » 06 Oct 2022, 22:58

I have an application which has about ten processes. The application is prone to failure due to one or more of its constituent processes crashing. Is there any way to figure out with AHK that a crash has occurred? The purpose of this would be to alert someone who may not be at the computer that the application has failed.

Rohwedder
Posts: 7551
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Detect failed (crashed) processes

Post by Rohwedder » 07 Oct 2022, 02:33

Hallo,
when your crashed processes torture the CPU,

Code: Select all

https://www.autohotkey.com/board/topic/113942-solved-get-cpu-usage-in/


User avatar
mikeyww
Posts: 26596
Joined: 09 Sep 2014, 18:38

Re: Detect failed (crashed) processes

Post by mikeyww » 07 Oct 2022, 09:01

Code: Select all

#SingleInstance Force
proc = notepad.exe
Loop {
 Process, Wait, %proc%
 Process, WaitClose, %proc%
 MsgBox, 48, Closed, Yikes!
}

User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: Detect failed (crashed) processes

Post by jNizM » 07 Oct 2022, 11:28

To monitor Process creation and termination see example 1
viewtopic.php?f=83&t=105171

To alert someone you can (if you) use Teams Webhooks (howto: viewtopic.php?f=7&t=91206) or send mails (search forum)
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile

Post Reply

Return to “Ask for Help (v1)”