Shotbox Logic  v2026.3.4.4 BETA
==============================
Macro buttons and logic rules for K-Frame.
Runs from your computer or a USB stick. No installer required.

REQUIREMENTS
  Windows 10 or 11 (64-bit), or macOS 13 or later (Apple Silicon or Intel).
  Your computer must be on a network that can reach the K-Frame.

QUICK START
  1. Extract the download. On Windows, open Shotbox and Logic.vbs.
     On Mac, open Shotbox Logic.app.
  2. Enter the frame's IP and tap Connect.

--- CHANGELOG --------------------------------------------------------

  2026.3.4.4 BETA  (Sep 18 2026)
    Added macOS support for Apple Silicon and Intel.
    Fixed macro names showing the wrong suite's names.
    Added a macro list filter in Shotbox and Logic.

  2026.3.3.0  (Jul 4 2026)   One combined connection window (IP entry,
                             master suite, per-suite connect); heartbeat
                             pulses the status lights; every connection
                             is Full; Keyer On/Off/Chained.

  2026.3.2.2  (Jul 3 2026)   Multi-suite rule targeting an unconnected
                             suite offers to connect it; removed the
                             firewall auto-repair (no UAC on launch).

  2026.3.2.1  (Jul 3 2026)   Single-suite rules follow the selected
                             master suite; Image Store still ID sent
                             as UInt32; still number plain 1-8999.

  2026.3.2.0  (Jul 2 2026)   CPL switcher control (ME transitions,
                             Image Store, E-MEM timeline, variable-driven
                             sources); cross-suite macro/E-MEM relays;
                             pipelined V14 multi-suite connect (~18s all
                             four); per-suite connection popup with
                             heartbeat monitors.
  2026.3.1.3  (Jun 30 2026)  UI updates · faster launch.
  2026.3.1.0  (Jun 29 2026)  Multi-suite stagger; queued-dot sync;
                             collapsible rule rows; keyer-on fix;
                             E-MEM sentinel filter; numpad legend.
  2026.3.0.0  (Jun 22 2026)  Merged macro+logic into single unified app.
                             Profiles. Suite badges. Run Rule action.
  2026.2.x    (earlier)      Standalone Shotbox with macro grid and profiles.

--- CONNECTION -------------------------------------------------------

WINDOWS FIREWALL
  The first time you connect on a computer, Windows pops up a security
  message asking whether to let this app use the network. You MUST tap
  Allow — if it is blocked or dismissed, the app cannot reach the frame
  and the connection will hang. Each new version may ask again, so
  always allow it.

  Suite dot colors:
    Green (solid)      Connected — live ME, AUX, keyer & source data
    Yellow (flashing)  Connecting — AUTH in progress
    Yellow (pulsing)   Queued — waiting for previous suite
    Grey               Disconnected
  Each dot pulses brighter when that suite's heartbeat is acknowledged.

  Phase dashes (left to right):
    1  Detect protocol (V14 UDP or V16+ TCP)
    2  Handshake (RDP / TCP setup)
    3  Suite select
    4  Subscribe
    5  Load data (catalog and state arriving)
    6  Fully live

LOCAL PORT 8765 (WINDOWS)
  On Windows, Shotbox Logic uses local port 8765 for its own interface. If another program
  is already using that port, Shotbox Logic stops safely and displays a clear
  message. Close the other program (or a stale Shotbox Logic process), then
  launch Shotbox Logic again. It does not terminate the other program or move
  itself to a different port automatically.

MULTI-SUITE MODE
  Enable Multi-Suite in the header to connect up to four suites.
  Suites always connect one at a time (never two handshakes at once,
  even from rapid Connect taps): on V14 the next suite starts as soon
  as the previous clears the login port; on V16+ each waits until the
  previous is fully live. This prevents overloading the frame.

--- LOGIC TAB -----------------------------------------------------

RULES
  Rules fire automatically when conditions are met. Each rule has one or
  more IF/THEN branches and an optional ELSE. Long rules collapse to a
  preview — tap the down-arrow to expand.

  IF conditions:
    Macro played / stopped / paused / continued
    ME source (any bus) matches a source number
    AUX bus matches a source number
    Keyer on / off air / chained
    Variable comparison (=, ≠, <, >, etc.)

  THEN / ELSE actions:
    Fire a macro (play / pause / continue / stop)
    Route an ME or AUX bus
    Set keyer on / off air, or CHAIN it to another keyer
    Set or increment a variable
    Run another rule (actions only, or check conditions first)
    Copy bus state from one suite to another
    Recall an E-MEM register

VARIABLES
  Named numbers shared across rules. Shown and editable in the Variables
  strip at the top of the Logic tab.

--- SHOTBOX TAB ---------------------------------------------------

  - 5×5 grid (default), up to 8×8, up to 8 pages
  - Macro names auto-populate from the frame's OLED catalog
  - Labels break one word per line; type an underscore to keep two
    words on the SAME line ("RED_CAM WIDE" shows "RED CAM" / "WIDE")
  - Animated border = playing or paused; solid blue = last played
  - Tapping a PAUSED macro CONTINUES it (mirrors K-Frame Menu)
  - Press and hold any button to edit it (no need to enable Edit mode)
  - Drag to reorder buttons or pages in Edit mode
  - Macro List panel: drag any macro directly onto a button

--- FILE SAVE / PROFILES ---------------------------------------------

  Profiles save Shotbox layouts, Logic rules + variables, or both in one
  file. The tile shows what's inside: Shotbox / Logic / Shotbox+Logic.
  Windows profiles are in the profiles folder next to the launcher.
  Mac profiles are in:
    ~/Library/Application Support/Orthicon/Shotbox Logic/profiles/
  Use Import and Export on Mac to copy profiles to or from another location.

  Choose Shotbox, Logic, or Select All before Load. Select All always chooses
  both sections. Built-in profiles display a LOCKED badge and cannot be
  overwritten, renamed, or deleted, including through punctuation/case
  variants of their names. Enter a new filename to save an editable copy.

--- SCREENSAVER -------------------------------------------------------

  Hold the Shotbox logo to enter. Hold the upper-left corner to exit.

--- LEGAL ------------------------------------------------------------

  Not affiliated with Grass Valley(R). Grass Valley(R) is a registered
  trademark. User agrees to indemnify and hold harmless the Developer
  from all claims arising from use of this Software.

--- DEVELOPMENT ------------------------------------------------------

  Brad Shaffer  ·  @orthicon  ·  macroeditor.org

  Thanks to (testing):
  Mikel Brewerton
  Seth Madway
  Mike Tiffee
  Brad Woodall
