Skip to content

Commit

Permalink
Forgot to check/prompt for JS's API
Browse files Browse the repository at this point in the history
  • Loading branch information
BenTalagan committed Nov 3, 2024
1 parent 0d8b705 commit 06f2268
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@
(scroll, resize, fit, etc).
--]]

local function CheckReapack(func_name, api_name, search_string)
if not reaper.APIExists(func_name) then
local answer = reaper.MB( api_name .. " is required and you need to install it.\z
Right-click the entry in the next window and choose to install.",
api_name .. " not installed", 0 )
reaper.ReaPack_BrowsePackages( search_string )
return false
end
return true
end

if not CheckReapack("JS_ReaScriptAPI_Version", "JS_ReaScriptAPI", "js_ReaScriptAPI") then return end


-- Using X-Raym's X-Raym_Scroll vertically to first selected track.lua
-- Thanks Raymond !
Expand Down

0 comments on commit 06f2268

Please sign in to comment.