Right Click
How do i enter a "right click" from a mouse or track ball as a command to bring up a pop up menu in a Macro I am building. In this case, I want to embed Metadata in Soundminer which requires right-clicking on the record and then selecting Embed Metadata.
- Kitch Membery @Kitch2021-04-11 08:50:06.376Z
Hi @Mark_Mangini,
I don't have Soundminer unfortunatly, so this script may or may not work. Fingers crossed.
const position = sf.mouse.getPosition().position; const popupMenu = sf.menu.openPopupMenuFromPosition({ position: position, isRightClick: true, }).popupMenu; popupMenu.popupMenuSelect({ menuPath: ["Embed Metadata"], });
I built it in the macro editor by added the following Macro Actions and then dragged the return values to link the actions together, like this;
Let me know if that works for you. :-)
Rock on!
Christian Scheuer @chrscheuer2021-04-11 12:52:02.039Z
Small correction: The Open & Select Item in Popup Menu does both the opening and the selecting. It's an action that should be used on its own. the action to combine with Open Popup Menu From Absolute Position would be Click Popup Menu:
Christian Scheuer @chrscheuer2021-04-11 12:53:21.774Z
So as a script, this would end up as:
const position = sf.mouse.getPosition().position; const popupMenu = sf.menu.openPopupMenuFromPosition({ position: position, isRightClick: true, }).popupMenu; popupMenu.menuClickPopupMenu({ menuPath: ["Embed Metadata"], });
Coming from this macro:
Christian Scheuer @chrscheuer2021-04-11 12:57:14.958Z
Note that all these examples are about right clicking where the mouse is at. I'm not sure if that's what
@Mark_Mangini meant.Mark, 2 things I would note here:
- It's always better to use a "global" menu item rather than a right-click menu if possible.
- In this case, at least in my Soundminer v5Pro, there's a global menu item available, called "Database" -> "Embed Metadata for Selected Records".
Just use a "Click Menu Item" with that path, and you're good to go.
Christian Scheuer @chrscheuer2021-04-11 12:57:51.293Z
Christian Scheuer @chrscheuer2021-04-11 13:32:31.695Z
Note, to actually do a right-click on the first selected item in Soundminer, something like this could be used:
sf.ui.soundminer.appActivateMainWindow(); sf.ui.soundminer.mainWindow.scrollAreas.first.tables.first.getElements('AXSelectedRows').first.popupMenuSelect({ isRightClick: true, menuPath: ['Embed Selected Records'], });
- MMark Mangini @Mark_Mangini
Thank you Christian. I will try this however I think you answered this more completely in a previous post and I’m embarrassed to admit that I did not see an existing menu command in Sound Miner that does the same thing. But this is an important tool for me to know how to use.
- MMark Mangini @Mark_Mangini
I think I forgot to post this to the forum and sent it to Kitch directly but a very useful macro for all ProTools users would be “open relink window”. This item is buried deep in a floating menu and is very difficult to get to. It requires a right click but, further, right click on an element that must be described rather than pointed to buy a mouse. Here’s the challenge: To get to this elusive menu the user must first open the workspace window, that’s easy enough. Select option O and that window opens up. To open the relink floating menu, one must then right click on either the audio files folder or the session icon in the left column. The challenge comes in identifying either of those items without having them attached to the name of a specific session. Using the preset Macros in SoundFlow, one is forced to identify them in relation to the session that they are attached to but what we want to do is have a generic command that will open up the relink window for any session. That means we need an action that simply identifies the position of the session icon or the audio files folder generically. Any thoughts are appreciated.
Kitch Membery @Kitch2021-04-11 17:53:29.521Z
Hi @Mark_Mangini,
I saw your other post regarding opening the relink window here on the forum and will take a look at it early this week. :-)
:-)
- In reply tochrscheuer⬆:
Kitch Membery @Kitch2021-04-16 22:51:28.308Z
@Juan_B_Caballero See the post above as an example of right-clicking at the mouse position to select a popup menu item.
Hope that helps :-)
- JJuan B Caballero @Juan_B_Caballero
Still learning! Thanks!
- MIn reply toMark_Mangini⬆:Mark Mangini @Mark_Mangini
Thanks Kitch. Much appreciated.