From eeb30925fa543ff798ffa726e043e5f887f3687c Mon Sep 17 00:00:00 2001 From: pblivingston <71585805+pblivingston@users.noreply.github.com> Date: Tue, 25 Nov 2025 15:40:15 -0500 Subject: [PATCH] command implement iremote --- lib/command.ps1 | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/lib/command.ps1 b/lib/command.ps1 index 891fc38..94192c1 100644 --- a/lib/command.ps1 +++ b/lib/command.ps1 @@ -1,33 +1,12 @@ -class Special { - [Object]$remote - +class Special : IRemote { Special ([Object]$remote) { AddActionMembers -PARAMS @('restart', 'shutdown', 'show') - - $this.remote = $remote } [string] identifier () { return 'Command' } - [string] ToString() { - return $this.GetType().Name - } - - [single] Getter ($param) { - return $this.remote.Getter("$($this.identifier()).$param") - } - - [void] Setter ($param, $val) { - if ($val -is [Boolean]) { - $this.remote.Setter("$($this.identifier()).$param", $(if ($val) { 1 } else { 0 })) - } - else { - $this.remote.Setter("$($this.identifier()).$param", $val) - } - } - [void] RunMacrobuttons() { 'Launching the MacroButtons app' | Write-Verbose Start-Process -FilePath $(Join-Path -Path $this.remote.vmpath -ChildPath 'VoicemeeterMacroButtons.exe')