• Getting Started
  • Platforms
  • Twitch
  • YouTube
  • Kick
  • Velora
  • Integrations
  • Amazon Polly
  • Crowd Control
  • Discord
  • DonorDrive
  • Fourthwall
  • Google Cloud TTS
  • IFTTT
  • JustGiving
  • Ko-fi
  • Loupedeck
  • Lumia Stream
  • Meld Studio
  • Microsoft Azure Speech
  • mtion studio
  • OBS Studio
  • Pally.gg
  • Patreon
  • PixelChat
  • PolyPop
  • Pulsoid
  • Rainmaker
  • ResponsiveVoice
  • SAMMI
  • Stream Avatars
  • Stream Deck
  • StreamElements
  • Streamlabs
  • Streamlabs Desktop
  • Streamloots
  • Throne
  • Tiltify
  • TipeeeStream
  • TITS
  • TreatStream
  • TTS.Monster
  • Twitter / X
  • veadotube
  • Voicemod
  • VTS Pog
  • VTube Studio
  • XSplit
  • Actions
  • Actions
  • Chat Action
  • Command Action
  • Conditional Action
  • Consumable Action
  • Counter Action
  • External Program Action
  • File Action
  • Game Queue Action
  • Group Action
  • Input Action
  • Moderation Action
  • Music Player Action
  • Overlay Action
  • Platform Message Action
  • Random Action
  • Repeat Action
  • Script Action
  • Serial Action
  • Sound Action
  • Special Identifier Action
  • Streaming Software Action
  • Text To Speech Action
  • User Lookup Action
  • Wait Action
  • Web Request Action
  • Action Groups
  • Events
  • Commands
  • Consumables
  • Consumables
  • Currency
  • Rank
  • Inventory
  • Stream Pass
  • Redemption Store
  • Overlays
  • Overlays
  • Overlay Widgets
  • Chat Widget
  • Custom Widget
  • End Credits Widget
  • Event List Widget
  • Game Queue Widget
  • Goal Widget
  • HTML Widget
  • Image Widget
  • Label Widget
  • Leaderboard Widget
  • Persistent Emote Effect Widget
  • Persistent Timer Widget
  • Poll Widget
  • Stream Boss Widget
  • Text Widget
  • Video Widget
  • Wheel Widget
  • YouTube Widget
  • Chat
  • Chat
  • Chat Commands
  • Pre-Made Chat Commands
  • Timers
  • Games
  • Moderation
  • Game Queue
  • Giveaways
  • Quotes
  • Music Player
  • Webhooks
  • Users
  • Reference
  • Special Identifiers
  • Developer API
  • MCP Server
  • C#
  • Python
  • Javascript

  • The Script action allows you to add code scripts to your commands that will be run when the action is triggered. This allows you to build more complex logic than can be done within regular actions, but without needing to write an entirely separate program. Scripts can be written in either C#, Python, or Javascript.

    There is no unique functionality provided in the Script action to directly interact with Mix It Up. The Script action is simply a means to perform more complex logic in a simpler form for experienced users. However, you are able to use the Mix It Up Developer API from inside your Script action to perform some operations within Mix It Up.

    Special Identifier replacement is supported within the text of the script.

    Any value returned from the script when it is run will be stored in the Special Identifier $scriptresult which can be used in subsequent actions.

    C#

    C# code is compiled within Mix It Up using the modern Roslyn compiler API (Microsoft.CodeAnalysis.CSharp’s CSharpCompilation and CSharpSyntaxTree), and the compiled method is then invoked via the System.Reflection classes. In the event of a compilation or run-time error, the error is logged and, unless “Hide Script Action Chat Errors” is enabled, sent as a chat message. The run returns no value in that case, so the $scriptresult Special Identifier is left untouched rather than being populated with the error text. Using statements are allowed for .NET native namespaces, but using libraries outside of those is not possible. A dedicated application would need to be written and run with the External Program Action.

    The C# code template provided must be adhered to, but you can add additional functions or change the code within the Run() function. The code must return a result at the end of the Run() function, but you do not need to use the result if you do not wish to. Just ensure that some value is returned at the end. Whatever is returned from the Run() function is what will be stored within the $scriptresult Special Identifier.

    Python

    Python scripts are run directly via the Python interpreter and require a local installation of Python on your PC. You must set the Executable location for Python before any Python scripts can be used under Settings -> Commands. In the event of a compilation or run-time error, the resulting error message will be saved to the $scriptresult Special Identifier.

    Because Python scripts are run using the Python interpreter, you can reference any external libraries you wish. However unlike running a Python script via the External Program Action where there is a physical file location, Python scripts via the Script Action will have their working directory default to the Mix It Up installation folder. So it is important that any files or libraries you reference use absolute file paths to avoid issues.

    Python console output and errors are parsed and used to populate the $scriptresult Special Identifier. Any result you wish to return must be written to standard output using the print() function in Python. Both streams are read as UTF-8, so accented and non-English characters come through as the script printed them.

    Javascript

    Javascript scripts are run using the Mix It Up Overlay. You can use external libraries by including them in the Overlay Endpoint via customization under Settings -> Overlay. In the event of a compilation or run-time error, there are no error messages logged. As such, you will need to use the F12 Developer Console in a regular web browser (Edge, Chrome, Firefox) to diagnose any issues that might exist in your code.

    The Javascript code template provided must be adhered to, but you can add additional functions or change the code within the run() function. The code must return a result at the end of the run() function, but you do not need to use the result if you do not wish to. Just ensure that some value is returned at the end. Whatever is returned from the run() function is what will be stored within the $scriptresult Special Identifier.


    Site Settings

    Accessibility

    Choose how the site looks. System follows your device setting.

    Cookies

    Choose which cookies to allow. Your preference is saved for 6 months.

    Necessary
    Required for the site to function correctly. Cannot be disabled.
    Analytics
    Helps us understand how visitors use the site. No personal data is shared with third parties.