storepreset, recallpreset

pester tests pass for all kinds
manual tests pass for all kinds
- show/hide
- lock/unlock
- showvbanchat/hidevbanchat
This commit is contained in:
pblivingston
2025-12-03 23:50:07 -05:00
parent cfa7de9b11
commit 1310ca25ef
5 changed files with 107 additions and 5 deletions

View File

@@ -431,21 +431,31 @@ The following methods are available:
- Reset(): Reset all config
- Save($filepath): string
- Load($filepath): string
- StorePreset($index, $name): (int, string)
- RecallPreset($index or $name): (int or string)
- RunMacrobuttons(): Launches the macrobuttons app
- CloseMacrobuttons(): Closes the macrobuttons app
example:
```powershell
$vmr.command.show()
$vmr.command.lock()
$vmr.command.Show()
$vmr.command.Lock()
$vmr.command.Load("path/to/filename.xml")
$vmr.command.RunMacrobuttons()
$vmr.command.StorePreset(63, 'example')
$vmr.command.StorePreset('example')
$vmr.command.StorePreset(63) # same as StorePreset(63, '')
$vmr.command.StorePreset() # same as StorePreset(''), overwrites last recalled
$vmr.command.RecallPreset('example')
$vmr.command.RecallPreset(63)
$vmr.command.RecallPreset() # same as RecallPreset(''), recalls last recalled
```
StorePreset('') and RecallPreset('') interact with the 'selected' preset. This is highlighted green in the GUI. Recalling a preset selects it. Storing a preset via GUI also selects it. Storing a preset with StorePreset does not select it.
### Fx
The following Fx commands are available: