update to examples

moved examples into examples/ directory.

Added two simple examples showing set and get float parameters and set multiple parameters.
This commit is contained in:
onyx-and-iris 2021-04-30 16:28:39 +01:00
parent 94be34b3da
commit 14eb019202
2 changed files with 30 additions and 2 deletions

28
examples/set_multi.ps1 Normal file
View File

@ -0,0 +1,28 @@
Import-Module Voicemeeter
try {
$vmr = Get-RemotePotato
$hash = @{
"Strip[0].Mute" = $true
"Strip[1].Mute" = $true
"Strip[2].Mute" = $false
"Strip[0].Mono" = $true
"Strip[1].Mono" = $false
"Strip[2].Mono" = $true
}
$vmr.Set_Multi($hash)
$hash = @{
"Strip[0].Mute" = $false
"Strip[1].Mute" = $false
"Strip[2].Mute" = $false
"Strip[0].Mono" = $true
"Strip[1].Mono" = $true
"Strip[2].Mono" = $false
}
$vmr.Set_Multi($hash)
}
finally { $vmr.Logout() }

View File

@ -1,7 +1,7 @@
. $PSScriptRoot\lib\voicemeeter.ps1 Import-Module Voicemeeter
try { try {
$vmr = [Remote]::new('potato') $vmr = Get-RemoteBanana
$vmr.button[0].state = $true $vmr.button[0].state = $true
$vmr.button[0].state $vmr.button[0].state