Configure Advanced Scene Switcher for Text File Alerts

This article provides a step-by-step guide on how to configure the Advanced Scene Switcher plugin in OBS Studio to monitor a local text file and automatically trigger alerts or actions when the file’s content changes.

Step 1: Create Your Local Text Database

Before configuring OBS, you need a local text file to act as your database.

  1. Create a new text document on your computer (e.g., alerts.txt).
  2. Type a placeholder keyword inside it, such as trigger_alert, and save the file.

Step 2: Access Advanced Scene Switcher

  1. Launch OBS Studio.
  2. In the top menu, click on Tools and select Advanced Scene Switcher.
  3. If the plugin is not running, go to the General tab and click Start to activate it.

Step 3: Set Up the Macro Trigger

To monitor the text file, you must create a macro that reads the file’s state.

  1. Navigate to the Macro tab.
  2. Click the + (plus) button at the bottom of the left pane to create a new macro. Name it something descriptive, like “Text Alert Trigger”.
  3. In the “If” section, change the first dropdown from “Scene” to File.
  4. Click the Browse button next to the file path field and select your alerts.txt file.
  5. In the next dropdown, choose content.
  6. Set the condition to matches or contains, and type the keyword you want to watch for (e.g., trigger_alert) in the text field.

Step 4: Configure the Alert Action

Once the plugin detects the keyword in your text file, it needs to perform an action.

  1. Go to the Then section of your macro.
  2. Select your desired action from the dropdown.
    • To show a graphic or play a sound, select Source visibility, choose your scene, select your alert source (like a Media Source or Text GDI+ source), and set it to Show.
    • To switch scenes entirely, select Scene, then choose your dedicated alert scene.
  3. To make the alert temporary, add a second action line by clicking the + button in the “Then” section:
    • Select Wait and set the duration (e.g., 5.00 seconds).
  4. Add a third action line:
    • Select Source visibility, select your alert source, and set it to Hide (or switch back to your previous scene).

Step 5: Resetting the Trigger (Optional)

If your external database or script does not automatically clear the text file after an alert, you can have Advanced Scene Switcher clear it for you to prevent the alert from looping.

  1. Add another action to the “Then” section.
  2. Select File, browse to your alerts.txt file, and choose write text.
  3. Leave the text field blank or write a default value (e.g., idle) to reset the file’s status.