然后您可以使用 SAS 中的“x”命令来调用它。这里的问题是,您需要在使用卷代码的每台计算机上安装第 3 方应用程序。
干杯 抢
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:
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.
我认为简短的答案是 SAS SOUND 函数有两个参数:音调和持续时间。由于音量不是参数,因此您无法在不调用操作系统的情况下控制音量。
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.
发布评论
评论(2)
它可以完成,但并不容易或优雅 - 特别是如果您想分发代码。如果您想以编程方式执行此操作,则必须从 SAS 调用相关的 Windows API DLL:
http://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#overdll.htm
正如文章所说,这并不容易(并且不能保证有效)。您感兴趣的 DLL 如下所示:
更改主音量级别
一个 kludge 解决方案将找到一个需要命令行调用来更改音量的第 3 方程序:
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=
然后您可以使用 SAS 中的“x”命令来调用它。这里的问题是,您需要在使用卷代码的每台计算机上安装第 3 方应用程序。
干杯
抢
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
我认为简短的答案是 SAS SOUND 函数有两个参数:音调和持续时间。由于音量不是参数,因此您无法在不调用操作系统的情况下控制音量。
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.