mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2026-04-18 13:33:31 +00:00
xy and fx parameters added to strip/bus classes.
GetType, GetVersion, SendText added to Remote class. Console output now written to Debug stream. ToString() method overriden for higher classes. formatter run through all files.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
Function Get_Profiles([String]$kind_id) {
|
||||
function Get_Profiles ([string]$kind_id) {
|
||||
$basepath = Join-Path -Path $(Split-Path -Path $PSScriptRoot) -ChildPath "profiles"
|
||||
if (Test-Path $basepath) {
|
||||
$fullpath = Join-Path -Path $basepath -ChildPath $kind_id
|
||||
@@ -6,7 +6,7 @@ Function Get_Profiles([String]$kind_id) {
|
||||
else { return $null }
|
||||
$filenames = @(Get-ChildItem -Path $fullpath -Filter *.psd1 -Recurse -File)
|
||||
|
||||
[HashTable]$data = @{}
|
||||
[hashtable]$data = @{}
|
||||
if ($filenames) {
|
||||
$filenames | ForEach-Object {
|
||||
(Join-Path -Path $fullpath -ChildPath $_) | ForEach-Object {
|
||||
@@ -15,23 +15,23 @@ Function Get_Profiles([String]$kind_id) {
|
||||
$data[$filename] = Import-PowerShellDataFile -Path $_
|
||||
}
|
||||
}
|
||||
return $data
|
||||
return $data
|
||||
}
|
||||
return $null
|
||||
}
|
||||
|
||||
Function Set_Profile {
|
||||
function Set_Profile {
|
||||
param(
|
||||
[Object]$DATA, [String]$CONF
|
||||
[Object]$DATA, [string]$CONF
|
||||
)
|
||||
try {
|
||||
if ($null -eq $DATA -or -not $DATA.$CONF) {
|
||||
throw [VMRemoteErrors]::new("No profile named $CONF was loaded")
|
||||
}
|
||||
Param_Set_Multi -HASH $DATA.$CONF
|
||||
Start-Sleep -m 1
|
||||
Start-Sleep -m 1
|
||||
}
|
||||
catch [VMRemoteErrors] {
|
||||
Write-Warning $_.Exception.ErrorMessage()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user