Old 07-09-2020, 06:57 AM   #1
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default [script pack] Show dynamic menus

These are a few scripts that some may find useful.

amagalma Smart track layout picker (categories with sub menus)
Displays all available TCP or MCP layouts (according to mouse cursor's context when the script is run), automatically categorized in sub-menus.


(pic)


amagalma_Go to marker (choose from menu list) &
amagalma_Go to region (choose from menu list)
They show a menu with all the available markers or regions for quick navigation.

(pic)


amagalma_Choose active take for item under mouse show menu
Displays a menu with all the available takes for the item under the mouse cursor. Makes life easier when having lots of takes.

(pic)


amagalma_Set project grid (via dropdown menu)
Displays a dropdown menu at mouse cursor position where you can choose a grid setting.


(pic)


amagalma_Show path from list menu (Resource, Selected Item, Project File, Record, Secondary Record, Render)
Shows the chosen item's path from the list:
- Reaper Resources path
- Selected Item path
- Project File path
- Record path
- Secondary Record path
- Render path
- First selected script's path in the Actions List




amagalma_Show menu for dry run (calculate loudness) actions



All in ReaPack
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)

Last edited by amagalma; 11-28-2021 at 05:51 AM.
amagalma is offline   Reply With Quote
Old 07-09-2020, 02:51 PM   #2
Vagelis
Human being with feelings
 
Vagelis's Avatar
 
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 3,795
Default

I was waiting for something like the track layout picker script. Going to try the others too, thanks!
Vagelis is offline   Reply With Quote
Old 07-10-2020, 04:03 AM   #3
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

If anyone has any other idea about menus that are dynamically created, then tell me
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 07-11-2020, 07:55 AM   #4
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Quote:
Originally Posted by amagalma View Post
If anyone has any other idea about menus that are dynamically created, then tell me
Cool! Is it OK if I use your code? I've got it displaying a menu with source FX names for my script, "Copy FX from item under mouse to selected items", this is so much better then an InputBox!

Last edited by Edgemeal; 07-11-2020 at 11:17 AM. Reason: Script updated, available on ReaPack
Edgemeal is offline   Reply With Quote
Old 07-11-2020, 08:24 AM   #5
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Yes, of course! Nice script!
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 07-11-2020, 08:47 AM   #6
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Quote:
Originally Posted by amagalma View Post
Yes, of course! Nice script!
Thanks!
This menu code will come in handy!
Edgemeal is offline   Reply With Quote
Old 07-11-2020, 11:47 AM   #7
Vagelis
Human being with feelings
 
Vagelis's Avatar
 
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 3,795
Default

Quote:
Originally Posted by amagalma;23165a114
amagalma_Choose active take for item under mouse show menu
Cool script, just came an idea. Would it be possible to preview a take from the menu before selection?
Like clicking on a small monitor icon after each number.
Vagelis is offline   Reply With Quote
Old 07-13-2020, 07:46 PM   #8
zaibuyidao
Human being with feelings
 
Join Date: Jan 2020
Location: Amoy
Posts: 179
Default

Cool, this menu is very useful. I have two ideas, I hope it can be added.:

All tracks are displayed through the menu. The picked tracks will be selected and select all items in track.
Support to select multiple tracks.

Set grid to: 1 2 4 8 16 32 64 128 ...
Support MIDI editor

Last edited by zaibuyidao; 07-14-2020 at 09:53 AM.
zaibuyidao is offline   Reply With Quote
Old 07-15-2020, 03:25 AM   #9
zaibuyidao
Human being with feelings
 
Join Date: Jan 2020
Location: Amoy
Posts: 179
Default

I wrote the function of Set MIDI Editor Grid in the most stupid way, which basically achieved the effect.

Can now be achieved [√] (Except [swing]).
Thank you!



Code:
local HWND = reaper.MIDIEditor_GetActive()
local take = reaper.MIDIEditor_GetTake(HWND)
local get_grid = reaper.MIDI_GetGrid(take)
local menu_01, menu_02, menu_03, menu_04, menu_05, menu_06, menu_07, menu_08, menu_09, menu_10, straight_on, triplet_on, dotted_on, swing_on

if reaper.GetToggleCommandStateEx(32060, 41003) == 1 then
  if get_grid == 1/32 then menu_01 = true else menu_01 = false end
  if get_grid == 1/16 then menu_02 = true else menu_02 = false end
  if get_grid == 1/8 then menu_03 = true else menu_03 = false end
  if get_grid == 1/4 then menu_04 = true else menu_04 = false end
  if get_grid == 1/2 then menu_05 = true else menu_05 = false end
  if get_grid == 1 then menu_06 = true else menu_06 = false end
  if get_grid == 2 then menu_07 = true else menu_07 = false end
  if get_grid == 4 then menu_08 = true else menu_08 = false end
  if get_grid == 8 then menu_09 = true else menu_09 = false end
  if get_grid == 16 then menu_10 = true else menu_10 = false end
  straight_on = true
end

if reaper.GetToggleCommandStateEx(32060, 41004) == 1 then
  if get_grid == 1/48 then menu_01 = true else menu_01 = false end
  if get_grid == 1/24 then menu_02 = true else menu_02 = false end
  if get_grid == 1/12 then menu_03 = true else menu_03 = false end
  if get_grid == 1/6 then menu_04 = true else menu_04 = false end
  if get_grid == 1/3 then menu_05 = true else menu_05 = false end
  if get_grid == 1/1.5 then menu_06 = true else menu_06 = false end
  if get_grid == 1/0.75 then menu_07 = true else menu_07 = false end
  if get_grid == 1/0.375 then menu_08 = true else menu_08 = false end
  if get_grid == 1/0.1875 then menu_09 = true else menu_09 = false end
  if get_grid == 1/0.09375 then menu_10 = true else menu_10 = false end
  triplet_on = true
end

if reaper.GetToggleCommandStateEx(32060, 41005) == 1 then
  if get_grid == 1.5/32 then menu_01 = true else menu_01 = false end
  if get_grid == 1.5/16 then menu_02 = true else menu_02 = false end
  if get_grid == 1.5/8 then menu_03 = true else menu_03 = false end
  if get_grid == 1.5/4 then menu_04 = true else menu_04 = false end
  if get_grid == 1.5/2 then menu_05 = true else menu_05 = false end
  if get_grid == 1.5 then menu_06 = true else menu_06 = false end
  if get_grid == 3 then menu_07 = true else menu_07 = false end
  if get_grid == 6 then menu_08 = true else menu_08 = false end
  if get_grid == 12 then menu_09 = true else menu_09 = false end
  if get_grid == 24 then menu_10 = true else menu_10 = false end
  dotted_on = true
end

if reaper.GetToggleCommandStateEx(32060, 41006) == 1 then
  swing_on = true
end

local menu = "#GRID||"
menu = menu
.. (menu_01 and "!" or "") .. "1/128" .. "|"
.. (menu_02 and "!" or "") .. "1/64" .. "|"
.. (menu_03 and "!" or "") .. "1/32" .. "|"
.. (menu_04 and "!" or "") .. "1/16" .. "|"
.. (menu_05 and "!" or "") .. "1/8" .. "|"
.. (menu_06 and "!" or "") .. "1/4" .. "|"
.. (menu_07 and "!" or "") .. "1/2" .. "|"
.. (menu_08 and "!" or "") .. "1" .. "|"
.. (menu_09 and "!" or "") .. "2" .. "|"
.. (menu_10 and "!" or "") .. "4" .. "||"
.. (straight_on and "!" or "") .. "straight" .. "|"
.. (triplet_on and "!" or "") .. "triplet" .. "|"
.. (dotted_on and "!" or "") .. "dotted" .. "|"
.. (swing_on and "!" or "") .. "swing" .. "|"

local title = "Hidden gfx window for showing the grid showmenu"
gfx.init(title, 0, 0, 0, 0, 0)
local dyn_win = reaper.JS_Window_Find(title, true)
local out = 0
if dyn_win then
  out = 7000
  reaper.JS_Window_Move(dyn_win, -out, -out)
end
local x, y = reaper.GetMousePosition()
gfx.x, gfx.y = x - 7 + out, y - 30 + out
local selection = gfx.showmenu(menu)
selection = math.floor(selection)
gfx.quit()

if selection > 0 then
  selection = selection - 1
  if selection == 1 then reaper.MIDIEditor_OnCommand(HWND, 41008) end -- 1/128
  if selection == 2 then reaper.MIDIEditor_OnCommand(HWND, 41009) end -- 1/64
  if selection == 3 then reaper.MIDIEditor_OnCommand(HWND, 41010) end -- 1/32
  if selection == 4 then reaper.MIDIEditor_OnCommand(HWND, 41011) end -- 1/16
  if selection == 5 then reaper.MIDIEditor_OnCommand(HWND, 41012) end -- 1/8
  if selection == 6 then reaper.MIDIEditor_OnCommand(HWND, 41013) end -- 1/4
  if selection == 7 then reaper.MIDIEditor_OnCommand(HWND, 41014) end -- 1/2
  if selection == 8 then reaper.MIDIEditor_OnCommand(HWND, 41015) end -- 1
  if selection == 9 then reaper.MIDIEditor_OnCommand(HWND, 41016) end -- 2
  if selection == 10 then reaper.MIDIEditor_OnCommand(HWND, 41017) end -- 4
  if selection == 11 then reaper.MIDIEditor_OnCommand(HWND, 41003) end -- straight
  if selection == 12 then reaper.MIDIEditor_OnCommand(HWND, 41004) end -- triplet
  if selection == 13 then reaper.MIDIEditor_OnCommand(HWND, 41005) end -- dotted
  if selection == 14 then reaper.MIDIEditor_OnCommand(HWND, 41006) end -- swing
end
reaper.SN_FocusMIDIEditor() -- Focus MIDIEditor
reaper.defer(function() end)
Attached Images
File Type: gif GRID.gif (56.1 KB, 258 views)
File Type: gif GRID-NEW.gif (56.3 KB, 1796 views)

Last edited by zaibuyidao; 07-18-2020 at 05:54 AM. Reason: Solved the ticking problem
zaibuyidao is offline   Reply With Quote
Old 07-15-2020, 11:22 AM   #10
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Quote:
Originally Posted by Vagelis View Post
Cool script, just came an idea. Would it be possible to preview a take from the menu before selection?
Like clicking on a small monitor icon after each number.
Unfortunately not...

Quote:
Originally Posted by zaibuyidao View Post
Cool, this menu is very useful. I have two ideas, I hope it can be added.:

All tracks are displayed through the menu. The picked tracks will be selected and select all items in track.
Support to select multiple tracks.

Set grid to: 1 2 4 8 16 32 64 128 ...
Support MIDI editor
For the first idea, it would be better to use the ReaConsole for this. Support for multiple selection is not possible.

I had done a script like yours for myself some time ago. I think I have it on ReaPack? If not, I'll upload it.
Better to change this in your code to something else and not keep it the same, in order to avoid possible interactions of scripts.
Quote:
Originally Posted by zaibuyidao View Post
Code:
local title = "Hidden gfx window for showing the markers showmenu"
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 07-15-2020, 09:11 PM   #11
zaibuyidao
Human being with feelings
 
Join Date: Jan 2020
Location: Amoy
Posts: 179
Default

Quote:
Originally Posted by amagalma View Post
I had done a script like yours for myself some time ago. I think I have it on ReaPack? If not, I'll upload it.
Thank you. I did not find the script on ReaPack.

Last edited by zaibuyidao; 07-17-2020 at 08:58 AM.
zaibuyidao is offline   Reply With Quote
Old 07-16-2020, 01:49 PM   #12
dahya
Human being with feelings
 
Join Date: Oct 2019
Posts: 229
Default

Thank you ! The smart track layout picker looks especially helpful. Thanks for sharing !
dahya is offline   Reply With Quote
Old 07-27-2020, 11:52 PM   #13
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Quote:
Originally Posted by zaibuyidao View Post
Thank you. I did not find the script on ReaPack.
It's on ReaPack now.
amagalma_Set project grid (via dropdown menu)


Quote:
Originally Posted by dahya View Post
Thank you ! The smart track layout picker looks especially helpful. Thanks for sharing !
Thanks!
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 07-28-2020, 10:20 AM   #14
zaibuyidao
Human being with feelings
 
Join Date: Jan 2020
Location: Amoy
Posts: 179
Default

Quote:
Originally Posted by amagalma View Post
It's on ReaPack now.
amagalma_Set project grid (via dropdown menu)
Thank you!
zaibuyidao is offline   Reply With Quote
Old 07-28-2020, 05:03 PM   #15
todoublez
Human being with feelings
 
todoublez's Avatar
 
Join Date: Aug 2019
Location: beijing
Posts: 612
Default

Hi amagalma

thx for the go to mkr/rgn script.
It wrks perfectly except one little issue on mac.

the drop-down menu doesn't show at my mouse cursor, instead it always shows at the bottom-right of the screen.
todoublez is offline   Reply With Quote
Old 08-04-2020, 12:41 PM   #16
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Quote:
Originally Posted by todoublez View Post
Hi amagalma

thx for the go to mkr/rgn script.
It wrks perfectly except one little issue on mac.

the drop-down menu doesn't show at my mouse cursor, instead it always shows at the bottom-right of the screen.

Latest versions of all scripts above should fix the OSX issue.
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 08-11-2020, 12:28 PM   #17
Delucci
Human being with feelings
 
Join Date: May 2017
Posts: 325
Default

Cool, I'm using the Grid menus right now
Any way to make the icon show what grid division are currently in use? I've been using toolbar to each subdivision, like this. But uses too much space!

Delucci is offline   Reply With Quote
Old 08-12-2020, 08:26 AM   #18
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Quote:
Originally Posted by Delucci View Post
Cool, I'm using the Grid menus right now
Any way to make the icon show what grid division are currently in use? I've been using toolbar to each subdivision, like this. But uses too much space!




Unfortunately not, because there is not an API available for changing toolbar icons. But when the script menu is open you can clearly see the active grid (it is ticked)
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 08-12-2020, 11:58 AM   #19
Delucci
Human being with feelings
 
Join Date: May 2017
Posts: 325
Default

Quote:
Originally Posted by amagalma View Post
Unfortunately not, because there is not an API available for changing toolbar icons. But when the script menu is open you can clearly see the active grid (it is ticked)
I see, indeed, it's ticked the currently grid. Again, thanks so much for your scripts!
Delucci is offline   Reply With Quote
Old 08-12-2020, 10:55 PM   #20
zaibuyidao
Human being with feelings
 
Join Date: Jan 2020
Location: Amoy
Posts: 179
Default

Is it possible to integrate [Go to marker/region] into a script? I think this will also be very useful.

Thank you!
zaibuyidao is offline   Reply With Quote
Old 08-13-2020, 01:36 AM   #21
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

You mean to combine the "go to region" script with the "go to marker script" in one?
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 08-13-2020, 04:22 AM   #22
zaibuyidao
Human being with feelings
 
Join Date: Jan 2020
Location: Amoy
Posts: 179
Default

Quote:
Originally Posted by amagalma View Post
You mean to combine the "go to region" script with the "go to marker script" in one?
Yes. This allows one more choice.
zaibuyidao is offline   Reply With Quote
Old 08-13-2020, 05:14 AM   #23
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Why not use the "View: Show region/marker manager window" or the "SWS: Open marker list"?
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 08-13-2020, 06:41 AM   #24
zaibuyidao
Human being with feelings
 
Join Date: Jan 2020
Location: Amoy
Posts: 179
Default

It is also good. They just don’t use dynamic menus to display markers, which will take up space on the display. The dynamic menu is a very good choice and very convenient.

I noticed that REAPER itself has this function, but it only appears after clicking twice on the transport. If it is a dynamic menu, it should be able to be called up immediately.

Attached Images
File Type: png marker,region.png (19.2 KB, 1493 views)
zaibuyidao is offline   Reply With Quote
Old 08-13-2020, 09:10 AM   #25
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Oh cool! Didn't know it had this thing!
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 08-30-2020, 03:18 AM   #26
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

amagalma_Set project grid (via dropdown menu) v1.03
- Changed menu order to a more practical one
- "Use the same grid division in arrange view and MIDI editor" setting is shown in menu header ("arrange" or "project")
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 11-09-2020, 02:25 AM   #27
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Added:

amagalma_Show path from list menu (Resource, Selected Item, Project File, Record, Secondary Record, Render)
Shows the chosen item's path from the list:
- Reaper Resources path
- Selected Item path
- Project File path
- Record path
- Secondary Record path
- Render path




Simple, but useful!
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 07-06-2021, 08:22 AM   #28
zaibuyidao
Human being with feelings
 
Join Date: Jan 2020
Location: Amoy
Posts: 179
Default

Quote:
Originally Posted by amagalma View Post
Added:

amagalma_Show path from list menu (Resource, Selected Item, Project File, Record, Secondary Record, Render)
Shows the chosen item's path from the list:
- Reaper Resources path
- Selected Item path
- Project File path
- Record path
- Secondary Record path
- Render path




Simple, but useful!
Very nice!

Can you add shortcut keys to the dynamic menus?
such as
-Reaper Resources path(R)
-Selected Item path(I)

In the list,
press "R" to run:Reaper Resources path
press "I" to run:Selected Item path

When the list is lengthened, I think it will be better to add shortcut keys.

Thank you
zaibuyidao is offline   Reply With Quote
Old 07-31-2021, 10:12 AM   #29
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

v1.1 changelog:
- Added "First selected script's path in the Actions List"


__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 07-31-2021, 12:14 PM   #30
todoublez
Human being with feelings
 
todoublez's Avatar
 
Join Date: Aug 2019
Location: beijing
Posts: 612
Default

Quote:
Originally Posted by amagalma View Post
v1.1 changelog:
- Added "First selected script's path in the Actions List"


woooo , this is awesome !!!
todoublez is offline   Reply With Quote
Old 11-21-2021, 11:35 AM   #31
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

amagalma_Show menu for dry run (calculate loudness) actions


__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)

Last edited by amagalma; 11-21-2021 at 11:45 AM.
amagalma is offline   Reply With Quote
Old 11-23-2021, 11:59 AM   #32
tonalstates
Human being with feelings
 
tonalstates's Avatar
 
Join Date: Jun 2020
Posts: 656
Default

Thanks for all these @amagalma, very useful!

There's an issue with most of them (if not all here) though where when I run any of your menu scripts, they all seem to open the menu on the bottom right corner of my screen, literally all of them do this.

This is in Reaper 6.42 and Mac m1 Big sur


Edit 5hrs later: At home in my Mojave Os R6.42 the menu doesn't even appear, I use two screens (2nd main) and when I run the action a really small window (that only shows like a red close window button) appears on my 1st screen on the bottom left, I can't move it or click it or anything. This happens with all the menu scripts.

Last edited by tonalstates; 11-23-2021 at 04:40 PM.
tonalstates is offline   Reply With Quote
Old 11-26-2021, 02:34 AM   #33
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Quote:
Originally Posted by tonalstates View Post
Thanks for all these @amagalma, very useful!

There's an issue with most of them (if not all here) though where when I run any of your menu scripts, they all seem to open the menu on the bottom right corner of my screen, literally all of them do this.

This is in Reaper 6.42 and Mac m1 Big sur


Edit 5hrs later: At home in my Mojave Os R6.42 the menu doesn't even appear, I use two screens (2nd main) and when I run the action a really small window (that only shows like a red close window button) appears on my 1st screen on the bottom left, I can't move it or click it or anything. This happens with all the menu scripts.

I'll check if I can reproduce on my OSX virtual machine and fix it. Thanks!
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 11-28-2021, 05:53 AM   #34
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

I updated all the scripts. Could someone on OSX check if the menus appear now in the correct position? Thanks!
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 11-28-2021, 11:38 AM   #35
tonalstates
Human being with feelings
 
tonalstates's Avatar
 
Join Date: Jun 2020
Posts: 656
Default

Hey Amagalma! Good day. I tried your scripts aaaannd, it seems to be working perfect now *but* only on my first screen (laptop screen), huh, really weird.

On my second screen it doesn't even appear idkw but the script is running because I can't press other buttons for a few seconds as if the menu was open. If you need a GIF I can upload it.

Thank you for checking this out.

Last edited by tonalstates; 11-28-2021 at 11:51 AM.
tonalstates is offline   Reply With Quote
Old 11-28-2021, 02:38 PM   #36
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Quote:
Originally Posted by tonalstates View Post
On my second screen it doesn't even appear idkw but the script is running because I can't press other buttons for a few seconds as if the menu was open.

Could you try this test script? :
Code:
local scr_width = ({reaper.my_getViewport(0,0,0,0,0,0,0,0,false)})[3]
gfx.setfont(1, "arial", 18)
gfx.init( "mouse position", 190, 70 )
function loop()
  gfx.x, gfx.y = 20, 10
  gfx.printf("%i , %i", gfx.mouse_x, gfx.mouse_y)
  gfx.x, gfx.y = 20, 40
  gfx.drawstr(reaper.GetMousePosition() > scr_width and "right of main monitor" or "main monitor")
  local char = gfx.getchar()
  if char ~=-1 and char ~= 27 then
    reaper.defer(loop)
  else
    gfx.quit()
    return reaper.defer(function() end)
  end
end
loop()

It will show the mouse position. Tell me if the numbers increase logically when moving the mouse cursor from the first to the second screen.
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 11-28-2021, 03:14 PM   #37
tonalstates
Human being with feelings
 
tonalstates's Avatar
 
Join Date: Jun 2020
Posts: 656
Default

So I tried the script and yeah, it seems to be a logical scale but I wasn't aware that the 2nd screen is represented as "right of main monitor" instead of a different screen, so maybe that's the thing?

Here's a visual of it.
https://i.imgur.com/G8bxHIf.mp4


Ok, so right after writing this I thought about my arrangement in the OS, "maybe that was it" and I just discovered that you can move the top menu bar from one screen to another (duh) and now it works buuuut... I'd really like to have my desktop in my first screen, as in, as it was before, because when moving the menu to another screen it also moves the desktop but if that's too much well boo hoo for me

https://i.imgur.com/9WDWny4.png

So basically my 2nd monitor (right) is used as my primary buuut my main menu and desktop is on the first, used as a second, like a media explorer.

Last edited by tonalstates; 11-28-2021 at 08:01 PM.
tonalstates is offline   Reply With Quote
Old 11-29-2021, 01:41 AM   #38
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Quote:
Originally Posted by tonalstates View Post
So I tried the script and yeah, it seems to be a logical scale but I wasn't aware that the 2nd screen is represented as "right of main monitor" instead of a different screen, so maybe that's the thing?
Don't pay attention to "right of main monitor", I wrote it and it is how the two monitors are arranged in my system.

Quote:
Ok, so right after writing this I thought about my arrangement in the OS, "maybe that was it" and I just discovered that you can move the top menu bar from one screen to another (duh) and now it works
So, for me to get it right.. If the top menu bar is at your left screen and you run the script with your mouse being on the right screen, the popup menu does not appear. But if your top menu bar is at your right screen, then the script popup menu appears, no matter if the mouse is at the left or the right screen?


PS. [whine mode on] OSX is such a pain in the ass... [whine mode off]
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 11-29-2021, 01:52 AM   #39
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

@tonalstates

Could you try this code?:

Code:
gfx.init( "Test", 100, 100, 0, 0, 0 )
gfx.x, gfx.y = gfx.mouse_x-40, gfx.mouse_y-40
local selection = gfx.showmenu("1|2|3")
gfx.quit()
reaper.defer(function() end)
Assign it to a shortcut key and run it by hitting the key.
Do not move the gfx window ("Test") that will appear!

Try it like this:
1) top menu bar: left monitor and mouse cursor: left monitor
2) top menu bar: left monitor and mouse cursor: right monitor
3) top menu bar: right monitor and mouse cursor: left monitor
4) top menu bar: right monitor and mouse cursor: right monitor

And tell me if and where the "Test" window and the "1|2|3" popup menu appear for each of the four cases.
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 11-29-2021, 10:10 AM   #40
tonalstates
Human being with feelings
 
tonalstates's Avatar
 
Join Date: Jun 2020
Posts: 656
Default

Quote:
Originally Posted by amagalma View Post
Don't pay attention to "right of main monitor"
Ahh ok hahaha thought it was maybe reading a system label or something like that.

Quote:
Originally Posted by amagalma View Post
So, for me to get it right.. If the top menu bar is at your left screen and you run the script with your mouse being on the right screen, the popup menu does not appear. But if your top menu bar is at your right screen, then the script popup menu appears, no matter if the mouse is at the left or the right screen?
Ah, I didn't try that or can't remember, but yeah, you're correct on the first part I'll try it and also your test script when I get home from work.

Quote:
Originally Posted by amagalma View Post
PS. [whine mode on] OSX is such a pain in the ass... [whine mode off]
From the small things I've seen in this forum, yeah, I can see that hahah sorry :'( and thanks for all this.
tonalstates is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:33 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.