2
1
At work we have this software that monitors our door system, we want to run a script each time someone enters the office.
One thing it can do is play .wav files.
We would want to run a different script depending on who opens a door, therefore we would play a different .wav file per user.
How can I run a script per person who opens the door.
Potential solutions I have thought about:
Initially I thought maybe we could do something with midi that could trigger a script.
I have also considered the possibility of monitoring the wav files for file reads, then triggering a script.
The software is running on a Windows 7 VM, it would be great if we could eventually run a .bat or .exe file.
Am I crazy?
How do you start that software? Couldn't you just (like you proposed) call that software to play a WAV and call another script simultaneously? – slhck – 2017-03-15T16:46:24.910
You can try Autoit. https://www.autoitscript.com/site/autoit/
– dukasvili – 2017-03-15T16:48:37.857@slhck The software itself triggers the
.wavfiles not on the program start but at other points during runtime, but thats all it can do. I want to do something when the.wavfile is played – Wez – 2017-03-15T16:49:02.367Ahah. Then this is more of a programming challenge, where you want to programatically find out if something is making noise. http://stackoverflow.com/questions/6616227/how-do-i-figure-out-if-windows-is-currently-playing-any-sounds — I don't think there are any existing apps that do this.
– slhck – 2017-03-15T16:52:32.923@dukasvili I've not used it before, just looked at the documentation, there is no mention of it being able to detect audio files being played. – Wez – 2017-03-15T16:53:17.613
@slhck you might be on to something there.. the only thing i didn't mention is that the software can play multiple
.wavfiles based on whats happening on the software. I would need to detect which one is playing to run other scripts. – Wez – 2017-03-15T16:55:08.9031
I think I may be on to an XY problem! You're asking about your attempted solution rather than the actual problem. Now it's all a little more clear... It would help if you could give us a little more background, i.e., what is the software you're talking about, what kinds of WAVs does it play, what are the actions you need to perform etc. I know you want to keep your question concise and applicable to other problems, but a few details may help.
– slhck – 2017-03-15T17:36:57.207It is possible for us to experiment with the software? Otherwise, would you be able to run Process Monitor (https://technet.microsoft.com/en-us/sysinternals/processmonitor.aspx) when the wav files are called for a couple of events and export all events to a PML. I'd be interested to see how the wav files are loaded and the call stacks.
– HelpingHand – 2017-03-15T19:52:30.907I have updated my question to explain a little more about the system. – Wez – 2017-03-15T20:02:49.187