From 3272dbf8025552435edcd5d5f816e536324c6475 Mon Sep 17 00:00:00 2001 From: amagalma Date: Mon, 13 Jan 2025 14:01:39 +0200 Subject: [PATCH] Update amagalma_Show menu for dry run (calculate loudness) actions.lua --- ...r dry run (calculate loudness) actions.lua | 23 ++----------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/Various/amagalma_Show menu for dry run (calculate loudness) actions.lua b/Various/amagalma_Show menu for dry run (calculate loudness) actions.lua index 75de7f5e9..d0b11b5ca 100644 --- a/Various/amagalma_Show menu for dry run (calculate loudness) actions.lua +++ b/Various/amagalma_Show menu for dry run (calculate loudness) actions.lua @@ -1,24 +1,12 @@ -- @description Show menu for dry run (calculate loudness) actions -- @author amagalma --- @version 1.02 --- @changelog Added option to calculate for Selected Items +-- @version 1.03 +-- @changelog No JS_ReaScriptAPI dependency -- @link https://forum.cockos.com/showthread.php?t=239556 -- @screenshot https://i.ibb.co/9w5VJwZ/dry-run-menu.gif -- @donation https://www.paypal.me/amagalma -- @about -- # Shows a menu with all the dry run actions at the mouse cursor --- --- - Requires JS_ReaScriptAPI - - -if not reaper.APIExists( "JS_Window_Find" ) then - reaper.MB( "Please, right-click and install 'js_ReaScriptAPI: API functions for ReaScripts'. Then restart Reaper and run the script again. Thanks!", "You need to install the JS_ReaScriptAPI", 0 ) - local ok, err = reaper.ReaPack_AddSetRepository( "ReaTeam Extensions", "https://github.com/ReaTeam/Extensions/raw/master/index.xml", true, 1 ) - if ok then reaper.ReaPack_BrowsePackages( "js_ReaScriptAPI" ) - else reaper.MB( err, "Something went wrong...", 0) - end - return reaper.defer(function() end) -end local t = { { "#Calculate loudness via dry run render|" }, @@ -37,13 +25,6 @@ local menu = "" for i = 1, #t do menu = menu .. t[i][1] .. "|" end -local title = "hidden " .. reaper.genGuid() -gfx.init( title, 0, 0, 0, 0, 0 ) -local hwnd = reaper.JS_Window_Find( title, true ) -if hwnd then - reaper.JS_Window_Show( hwnd, "HIDE" ) -end -gfx.x, gfx.y = gfx.mouse_x-52, gfx.mouse_y-70 local selection = gfx.showmenu(menu) gfx.quit()