View Single Post
Old 11-20-2018, 10:15 PM   #292
Arthur McArthur
Human being with feelings
 
Arthur McArthur's Avatar
 
Join Date: Sep 2016
Location: Toronto
Posts: 744
Default

This may be of help to some people. Thanks to Edgemeal and Julian Sader's new extension here's two scripts, one to open Reaticulate if it isn't open:

Code:
hWnd = reaper.JS_Window_Find("Reaticulate", true)-- find window by title bar text
if hWnd ~=nil then -- 
  
else -- launch  script
  cmd = reaper.NamedCommandLookup('_RSbe259504561f6a52557d2d1c64e52ef13527bf17') --put command ID here
  if cmd > 0 then 
    reaper.Main_OnCommand(cmd, 0)
  else
    reaper.MB("Invalid script Command ID!","ERROR",0)  
  end
end
And another to close it if it is open:

Code:
hWnd = reaper.JS_Window_Find("Reaticulate", true) -- find window by title bar text
if hWnd ~=nil then 
 reaper.Main_OnCommand(reaper.NamedCommandLookup"_RSbe259504561f6a52557d2d1c64e52ef13527bf17", 1) -- put command ID here
end
You can link these to your open MIDI item commands so, for example, Reaticulate always opens when you open a MIDI item and always closes when you close the MIDI editor. You'll probably have to swap out the command ID for whatever it is on your machines.
Arthur McArthur is offline   Reply With Quote