To aid in the ability to multitask, I added a datastep that would play the first three notes of hot cross buns after my program would finish, so I could just minimize SAS and do something else while it runs.
The thing is, I’ve had a few complaints from colleagues that they would forget that their volume was up all the way, and would receive a not-so-pleasant surprise when their program would complete.
Is there a way to pull in system info, more specifically, the computer volume level, so I can set a threshold in which the music will play or not?
It can be done but is not easy or elegant – especially if you want to distribute the code. If you wanted to do it programmatically you would have to make a call to the relevant windows API DLL from SAS:
http://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#overdll.htm
As the article says it’s not easy (and not guaranteed to work). The DLL you would be interested in is the one below:
Changing master volume level
A kludge solution would be to find a 3rd party program that takes command line calls to change the volume:
http://www.google.com/search?hl=en&client=firefox-a&hs=Tql&rls=org.mozilla%3Aen-US%3Aofficial&q=windows+change+volume+command+line&aq=f&aqi=&aql=&oq=
You could then call that using the ‘x’ comamnd in SAS. The issue here would be that you would need to install the 3rd party app on every machine that used your volume code.
Cheers
Rob