Action based on computer 'ding' system sound

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
arobin4
Junior Coder
Posts: 33
Joined: Sat Apr 07, 2012 5:41 am

Action based on computer 'ding' system sound

Post by arobin4 » Wed Jan 07, 2015 10:36 pm

Hello forum:

I am wondering if the following is possible. Please weigh in. I need my code to take an action based on the 'ding' computer system sound. I have simplified the problem with sample code below using notepad.exe. Just launch Notepad first. (I commented out the If> statement)

WindowAction>1,Untitled - Notepad

Wait>1

SendText>hello world

Wait>1

WindowAction>3,Untitled - Notepad

MouseMoveRel>100,100

LDown

LDown

/*

If>there is a 'ding' sound
do something about it
EndIf

*/


Thanks!
Aaron

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Action based on computer 'ding' system sound

Post by Marcus Tettmar » Thu Jan 08, 2015 1:05 pm

I'm not aware of any way to do this. Would it make more sense to try and detect what CAUSES the ding to sound?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

arobin4
Junior Coder
Posts: 33
Joined: Sat Apr 07, 2012 5:41 am

Re: Action based on computer 'ding' system sound

Post by arobin4 » Thu Jan 08, 2015 11:56 pm

Thanks for replying Marcus. The application that I am sending mouse clicks to would unpredictably run slow sometimes. When this happens a dialog box appears and the message that appears in the dialog box isn't necessarily known ahead of time. The mouse clicks sent to the application during this state have no effect on the application because the dialog box is open. When in this state however, the "dings" are heard. This is why I was thinking that it would be really nice if MacroScheduler could detect this condition then take appropriate action to clear the message window before executing with the remainder of the code.

Aaron

User avatar
Phil Pendlebury
Automation Wizard
Posts: 543
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Re: Action based on computer 'ding' system sound

Post by Phil Pendlebury » Wed Feb 11, 2015 1:14 pm

Is there no area in your application that changes when clicked, for example?

Then you can take a screen grab of the "button" attempt to click it (or move over it) and if the button remains un-changed then the app is obviously unresponsive.

For example: Look at the "Forums" button at the top of this page. Look what happens when you place the mouse over it. If the browser was unresponsive that would not happen and the button would remain the same.
Phil Pendlebury - Linktree

arobin4
Junior Coder
Posts: 33
Joined: Sat Apr 07, 2012 5:41 am

Re: Action based on computer 'ding' system sound

Post by arobin4 » Fri Feb 20, 2015 7:13 pm

Hello Phil,
Yes there is and this is the approach I ultimately decided to take. Thanks for your input!

Aaron

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts