From 14eb0192027cc406c3a59bda4fbf539ebeb720ff Mon Sep 17 00:00:00 2001 From: onyx-and-iris <75868496+onyx-and-iris@users.noreply.github.com> Date: Fri, 30 Apr 2021 16:28:39 +0100 Subject: [PATCH] update to examples moved examples into examples/ directory. Added two simple examples showing set and get float parameters and set multiple parameters. --- examples/set_multi.ps1 | 28 +++++++++++++++++++++ example.ps1 => examples/setandgetparams.ps1 | 4 +-- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 examples/set_multi.ps1 rename example.ps1 => examples/setandgetparams.ps1 (83%) diff --git a/examples/set_multi.ps1 b/examples/set_multi.ps1 new file mode 100644 index 0000000..9c0f89b --- /dev/null +++ b/examples/set_multi.ps1 @@ -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() } diff --git a/example.ps1 b/examples/setandgetparams.ps1 similarity index 83% rename from example.ps1 rename to examples/setandgetparams.ps1 index 39c7ac8..3209509 100644 --- a/example.ps1 +++ b/examples/setandgetparams.ps1 @@ -1,7 +1,7 @@ -. $PSScriptRoot\lib\voicemeeter.ps1 +Import-Module Voicemeeter try { - $vmr = [Remote]::new('potato') + $vmr = Get-RemoteBanana $vmr.button[0].state = $true $vmr.button[0].state