operating-system


Ridiculous Question, but can I have SAS return the computer's volume level?


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:
http://stackoverflow.com/questions/294292/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
I think the short answer is the the SAS SOUND function has two parameters: pitch and duration. Since volume is not a parameter, you can't control the volume without making a call to the OS.

Related Links

What check to make in exec-missing in PINTOS
What does the kernel do while another process is running
Not able to understand fork() system call clearly?
Process termination by his parent or other processes
Using SIMD instructions in application oriented to multiple platforms and OS
Identify operating system
Do CPU and main memory need drivers to work?
Page frame number vs. Page table entry
About FAT-32 File System
Does a virtual address always translate to a physical one
How does the Virtual Memory Management System determine the backing store location in the disk?
Paged virtual address translation using a linear page table
Condition for deadlock to happen
Upating page table when an entry is evicted from TLB
what is the difference between kernel and system software?
Does a 64 bit runtime run faster than a 32 bit?

Categories

HOME
xpath
freeradius
concurrency
writefile
message-queue
portable-class-library
tfs2015
visualforce
javafx-8
xamarin-zebble
fbloginview
freertos
mailgun
corona
heap-dump
psql
multiple-tables
azure-machine-learning
fluent-migrator
rxjs5
perfino
backendless
tracing
crud
msdeploy
amazon-cloudtrail
laravel-4.2
amazon-iam
es6-modules
autodesk-model-derivative
tightvnc
argv
reporting
nsmutablearray
cucumber-junit
ms-media-foundation
bootstrap-sass
llvm-ir
suds
resampling
minikube
git-tfs
reverse-dns
react-intl
flume-twitter
jenkins-slave
adblock
libreoffice-writer
nothing
scala-breeze
redisson
winston
freshdesk
http-basic-authentication
alertify
dymola
http4s
openerp-6
prefetch
thread-exceptions
nsrunloop
dmarc
p6spy
callouts
nsdata
simian
xcopy
taco
grinder
opencyc
mousehover
search-form
google-gdk
textscan
abstract-factory
ocmockito
deque
sablecc
subview
n-tier-architecture
libgcc
csslint
stripe.net
forio-contour
incognito-mode
radius-protocol
profiles
typesafe-stack
mp4parser
codahale-metrics
django-facebook
jquery-cycle
story
zend-pdf
image-formats
viewpagerindicator
coordinate
system-information
pcspim
firebird1.5
django-apps
getopts
css-friendly
digiflow
ognl
eaccelerator
jdownloader
3-tier
raw-data
browser-based
mysqli-multi-query
database-cloning
ning
server-load

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App