From 73fbb0e6e31b937e9c7ca09f246ef841ac5f0204 Mon Sep 17 00:00:00 2001 From: amagalma Date: Sat, 14 Dec 2024 23:36:42 +0200 Subject: [PATCH] Release Zoom to current region (where edit cursor is) v1.00 (#1473) --- ...galma_Zoom to current region (where edit cursor is).lua | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 View/amagalma_Zoom to current region (where edit cursor is).lua diff --git a/View/amagalma_Zoom to current region (where edit cursor is).lua b/View/amagalma_Zoom to current region (where edit cursor is).lua new file mode 100644 index 000000000..b17e72761 --- /dev/null +++ b/View/amagalma_Zoom to current region (where edit cursor is).lua @@ -0,0 +1,7 @@ +-- @description Zoom to current region (where edit cursor is) +-- @author amagalma +-- @version 1.00 +-- @about Requires JS_ReaScriptAPI + +local pixels=20 -- Set how many pixels of clearance you want +local A1a,A2a,A3a,A4a,A5a,A6a,A7a=reaper.GetSet_ArrangeView2, reaper.GetCursorPosition,reaper.EnumProjectMarkers,reaper.JS_Window_FindChildByID,reaper.GetLastMarkerAndCurRegion,reaper.GetMainHwnd,reaper.JS_Window_GetClientRect if A4a then local _,hfbn=A5a(0,A2a())if hfbn~=-1 then local retval,sra,HHs,ojdJ,ojS,sojJ=A3a(hfbn) local uh3HH=A4a(A6a(),0x3E8)if uh3HH then local ppp,qq2,kkk3,dxx,uuU3=A7a(uh3HH)if ppp then A1a(0,1,qq2+pixels,dxx-pixels,HHs,ojdJ) end end end end reaper.defer(function()end)