Reaper Scripts: Play/Stop & Show video ONLY if video is not shown

I was surprised to see that this wasn’t an option already. (As far as i could find, at least)

The Problem:
I’m sometimes working with little monitor real-estate these days, and so I have my video, action list, fx browser and a few other windows all on the same docker.

So if i am working to video and i use any of these windows, the video gets hidden - and i have to unhide it when playing. It’s a simple hotkey to trigger the video view… but its a toggle. That means if you make a custom action to do both play and toggle video, when the video is active (50% of the time), it will deactivate/hide the video.

The Solution:
Here’s a script with the following functionality:

If playback is not running:
shows video window if hidden/inactive
Immediately run native Play/stop

If playback is running:
Immediately run native Play/stop, ignoring video state.

The second script does the same with Play/Stop (move edit cursor on stop)

TL;DR: Screen real-estate is a thing and these scripts might help you out with that.

Toggle PlayStop and show video if not active (move play cursor).luaToggle PlayStop and show video if not active.lua