Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function checkJSAPI(requiredVersion)
if reaper.JS_ReaScriptAPI_Version and reaper.JS_ReaScriptAPI_Version() >= requiredVersion then
return true
end
local button = reaper.MB(string.format([[
This script requires js_ReaScriptAPI %s or newer. Do you want to install it now?
Choose [Yes] to open ReaPack's package browser.
]], requiredVersion), "js_ReaScriptAPI not found", 4)
if button == 6 then
reaper.ReaPack_BrowsePackages('js_ReascriptAPI')
end
return false
end
if not checkJSAPI(0.961) then
return reaper.defer(function() end)
end
doSomething()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.