Hello to all!
There is an intereting task to change system sound volume through WinCC OA.
Is there any way to do that?
Or maybe any advices? B)
Change sound volume using ctrl/
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: Change sound volume using ctrl/
When using Linux you can probably do it with the command "pactl" or "alsamixer".
For Windows you have to install some 3rd party software or implement your own tool.
Best Regards
Leopold Knipp
Senior Support Specialist
For Windows you have to install some 3rd party software or implement your own tool.
Best Regards
Leopold Knipp
Senior Support Specialist
- ozangor
- Posts:44
- Joined: Thu Sep 22, 2011 2:57 pm
Re: Change sound volume using ctrl/
There is this small cmdline application nircmd.
You can call the commands by using "system()" function of wccoa.
This has a lot of utility functions to play with. However, make sure the license is ok for your usage.
This is applicable only for Windows though.
You can call the commands by using "system()" function of wccoa.
Code: Select all
btnClicked(string name, const mapping& event)
{
string command = "nircmd ";
switch(name)
{
case "btnVolumeUp":
{
command += "changesysvolume 5000";
break;
}
case "btnVolumeDown":
{
command += "changesysvolume -5000";
break;
}
case "btnMute":
{
command += "mutesysvolume 1";
break;
}
case "btnUnmute":
{
command += "mutesysvolume 0";
break;
}
}
system(command);
}
This is applicable only for Windows though.