From 268ac21715ba78425fc59cfebdbecf28c651f91b Mon Sep 17 00:00:00 2001 From: christian Date: Wed, 21 Oct 2026 14:14:08 -0400 Subject: [PATCH] SC Vista opens the newest Tiverton Lighting through its autoload preference Co-Authored-By: Claude Opus 5.5 --- README.md | 9 ++++++++ remote-access/start-vista-newest.ps1 | 32 ++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 remote-access/start-vista-newest.ps1 diff --git a/README.md b/README.md index 68146da..e71726a 100644 --- a/README.md +++ b/README.md @@ -277,6 +277,15 @@ a hold on any key fixes it at any time, on that location's own deck or from NA's what is found now, keeping its name, PIN and pages. `python3 -m settings.location upgrade-companion` brings an older Companion to 5.0.7 from NA's copy (settings come along; the old version stays installed). +## Southcoast's Vista show + +SC's Lighting PC (SC Lighting PC, 10.5.1.168) keeps several copies of `Tiverton Lighting.v3s`; Vista opens the +**newest** (the user's choice, 2026-10-21), never an autosave from `_Backups`. Its `\StatusPanel\Start Vista` task runs +`C:\ProgramData\StatusPanel\start-vista.ps1` (`remote-access/start-vista-newest.ps1`), which sets Vista's +`` in `Documents\Vista 3\.preferences` to that copy (the old file kept as `.preferences.before-status-panel`) +and starts Vista; a running Vista is left alone. `-WhatIf` shows the pick without changing anything. Running the PC join +line again resets the task to plain `Vista.exe`: point it back at the script afterwards. + ## A location on its own (Apollo Beach) Apollo Beach runs its panel itself: not on NA's deck, not in NA's backups, no NA key on its Macs. diff --git a/remote-access/start-vista-newest.ps1 b/remote-access/start-vista-newest.ps1 new file mode 100644 index 0000000..7c148a1 --- /dev/null +++ b/remote-access/start-vista-newest.ps1 @@ -0,0 +1,32 @@ +# start-vista-newest.ps1 - the status panel's "Start Vista" task on a Lighting PC: Vista opens the +# newest copy of the location's show, through Vista's own autoload preference (as North Attleboro's +# Vista opens Prop Takeover). Southcoast keeps several copies of "Tiverton Lighting.v3s"; the user +# chose "whichever is newest" (2026-10-21). Autosave backups (_Backups) are never picked. +# +# Installed at C:\ProgramData\StatusPanel\start-vista.ps1; the task runs +# powershell.exe -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -File C:\ProgramData\StatusPanel\start-vista.ps1 -Show "Tiverton Lighting.v3s" +# A running Vista is left alone: its show is never changed under it. +param( + [string]$Show = "Tiverton Lighting.v3s", + [string]$Vista = "C:\Program Files (x86)\Chroma-Q\Vista3\Vista.exe", + [switch]$WhatIf +) +if ((Get-Process -Name Vista -ErrorAction SilentlyContinue) -and -not $WhatIf) { "Vista is running: left alone"; exit 0 } +$roots = @("$env:USERPROFILE\Desktop", "$env:USERPROFILE\Documents") | Where-Object { Test-Path $_ } +$newest = Get-ChildItem -Path $roots -Recurse -Filter $Show -File -ErrorAction SilentlyContinue | + Where-Object { $_.FullName -notmatch '\\_Backups\\' } | Sort-Object LastWriteTime -Descending | Select-Object -First 1 +$prefs = "$env:USERPROFILE\Documents\Vista 3\.preferences" +if ($newest -and (Test-Path $prefs)) { + $text = [IO.File]::ReadAllText($prefs) + $line = '' + [Security.SecurityElement]::Escape($newest.FullName) + '' + $new = [regex]::Replace($text, '.*?', [Text.RegularExpressions.MatchEvaluator]{ param($m) $line }) + "newest: $($newest.FullName) ($($newest.LastWriteTime))" + if ($new -ne $text -and -not $WhatIf) { + Copy-Item $prefs "$prefs.before-status-panel" -Force + [IO.File]::WriteAllText($prefs, $new) + "autoload set" + } +} else { + "no $Show found, or no Vista preferences: Vista starts with its own choice" +} +if (-not $WhatIf) { Start-Process -FilePath $Vista -WorkingDirectory (Split-Path $Vista) }