Spaces:
Build error
Build error
Download reascripts/common/libs/ReaUtil.lua from TechAudio/ReaSpeech-Cloud: direct link, hf CLI and curl.
- Browser
- Download file 696 Bytes
-
https://huggingface.co/spaces/TechAudio/ReaSpeech-Cloud/resolve/main/reascripts/common/libs/ReaUtil.lua
- Command line
-
hf download hf://spaces/TechAudio/ReaSpeech-Cloud/reascripts/common/libs/ReaUtil.lua
-
curl -L -o ReaUtil.lua https://huggingface.co/spaces/TechAudio/ReaSpeech-Cloud/resolve/main/reascripts/common/libs/ReaUtil.lua
696 Bytes
| --[[ | |
| ReaUtil.lua - Utility functions for Reaper Interaction | |
| ]]-- | |
| ReaUtil = { | |
| ACTIVE_PROJECT = 0 | |
| } | |
| function ReaUtil.proxy_main_on_command(command_number, flag) | |
| return function (proj) | |
| proj = proj or 0 | |
| reaper.Main_OnCommandEx(command_number, flag, proj) | |
| end | |
| end | |
| function ReaUtil.disabler(context, error_handler) | |
| error_handler = error_handler or function(msg) | |
| reaper.ShowConsoleMsg(msg .. '\n') | |
| end | |
| return function(predicate, f) | |
| local safe_f = function() | |
| xpcall(f, error_handler) | |
| end | |
| if not predicate then | |
| safe_f() | |
| return | |
| end | |
| reaper.ImGui_BeginDisabled(context, true) | |
| safe_f() | |
| reaper.ImGui_EndDisabled(context) | |
| end | |
| end |