Software, which will make a sound when an application becomes responsive again

5

2

I am using several application, which are really slow. They will stay unresponsive for between 1 second and up to five minutes and I do not have any good way of predicting their response times. This means that I will do other work and from time to time check whether the application has responded. Needless to say, this wastes a lot of time. Therefore, it would be great if there was a sound whenever the application responded. Because I cannot modify the application, the sound would have to come from a tool, which monitors the applications and whenever an application as not responded for more than, say 5 seconds, it will make a sound when it becomes responsive again.

There are several ways, in which the applications can become unresponsive. In one, the mouse will turn into an hour-glass whenever it is over the application, but task manager states that it is responding, in others, task manager will state that they are not responding.

Does such a tool exist?

David

Posted 2011-09-12T09:51:36.243

Reputation: 1 249

Is it about Windows? – Vi. – 2011-09-12T12:30:13.943

It could exist, how much is it worth to you? haha, no really. – Tommy – 2011-09-14T22:51:17.540

@Tommy. You can write to me at mrdavidandersen@gmail.com and we can discuss it. – David – 2011-09-15T09:13:15.727

I believe it's possible but would require more information, e.g. the exact names of the programs involved. – James P – 2011-09-16T15:47:39.257

@james I was hoping for a generic solution. Wouldn't that be possible? – David – 2011-09-16T16:52:39.417

David, when the program stops responding, run the following command in shell: tasklist /FI "STATUS eq NOT RESPONDING" . If the unresponsive program appears in the list, I think there's a simple script to do what you want. – Noam Kremen – 2011-09-17T08:53:22.803

@Noam: David said that it doesn't necessarily have to be the Task Manager's state. In the case that it's solely GUI unresponsiveness this is hard to implement... – Tamara Wijsman – 2011-09-18T01:07:34.277

@Tom - You're correct. But as long as the unresponsiveness correlates to high cpu usage, I can still detect it with tasklist and carry on from there. David - is this the case? – Noam Kremen – 2011-09-18T13:18:22.063

1@Noam N. Kremen I have tested now, and the "Not responding" state in task manager would catch about 5-10% of the cases. Of the the application is waiting for input from a central server, which leaves the GUI unresponsive, this means that the CPU usage is low during these periods. – David – 2011-09-18T13:40:38.087

1

Then I can't think of a way to detect an idle state without changing the source code. Related discussion.

– Noam Kremen – 2011-09-18T14:08:57.677

@Noam N. Kremen Thanks for the link, this seems like a hard problem to solve... I guess I have to lower my standards and say that the tool did not need to work in 100% of the situations, but hopefully in more than 50%. – David – 2011-09-18T15:38:21.077

Gave it some more thought - If the program window title changes to "working/waiting/.." it can be caught with an AutoIt script. If not, AutoIt may still help - you'll need to use a dll call to SendMessageTimeoutW (user32.dll) and see if there's indeed a timeout when your app hangs. – Noam Kremen – 2011-09-19T12:02:41.447

@Noam Thank you for your effort! The title does not change. I do not know how to test the SendMessageTimeoutW idea, but from the description of that function, I can say that it seems relevant at least. – David – 2011-09-19T15:24:32.740

Answers

1

You could achieve something like this with a simple powershell script.

e.g.:

while(1)
{

if((Get-Process Notepad).Responding -match "False")
{
    $toggle=1;
}

sleep 3;

if((Get-Process Notepad).Responding -match "True" -and $toggle -eq 1)
{
    [System.Media.SystemSounds]::Exclamation.Play();
    $toggle=0;
}

}

Open up a notepad instance then run this script. Once in notepad, try opening up a binary around 5 - 10MB. Once the binary data is displayed and Notepad becomes responsive again, Windows will make the exclamation sound. This can be easily modified to incorporate multiple processes and Windows includes numerous other sounds out of the box. The script incorporates a 3 second delay between checks to cut down on unnecessary CPU cycles.

John T

Posted 2011-09-12T09:51:36.243

Reputation: 149 037