No internet connection
  1. Home
  2. Support

options for new markers in ProTools to choose colour and marker lane

By Andrej Bako @Andrej_Bako
    2024-04-10 11:23:39.683Z

    I was wondering if there is any scripts for the new marker options since about PT 2023.6 or something?

    I would like to have a button to add a marker to a specific marker lane (there are now 5 possible lanes) so 5 buttons, which will also choose the colour for each lane... so lets say marker lane 1 red, marker lane 2 yellow... is that doable atm? How could it be done? (newbie)

    • 31 replies

    There are 31 replies. Estimated reading time: 31 minutes

    1. S
      SoundFlow Bot @soundflowbot
        2024-04-10 11:23:42.453Z

        Thanks for contacting SoundFlow support.

        Please note, that the best way to get help with a script, macro or other content installed from the Store or content that you've made yourself, is to select the script/macro, then click the red Need help button, and then click "Get help with this script or macro".
        By using this method, we will get access to more information and so should be able to help you quicker.
        You can read more about how this works here: bit.ly/sfscripthelp

        If you're seeing an error that isn't related to scripts or macros, and you think this is a bug in SoundFlow, please file a Help/Issue bug report.
        You can see how to do this by going to bit.ly/sfhelpissue

        1. In reply toAndrej_Bako:
          Chris Shaw @Chris_Shaw2024-04-10 16:27:35.377Z2024-04-10 16:47:40.817Z

          Something like this should do it.
          Just change the values of the constants of the first four lines to change the ruler, reference , color, and name.

          const destinationRulerName = "Markers 3"
          const markerReference = "Absolute" // or "Bar | Beat"
          const colorHotKeys = "ctrl+6" // or "cmd+1" etc
          const locationName = "Hey There!" // if quotes are empty ("") then script will use default name
          
          // Create Marker
          sf.keyboard.press({ keys: "numpad enter" });
          
          // Wait for new memory location window
          const memLocDialog = sf.ui.proTools.newMemoryLocationDialog;
          
          memLocDialog.elementWaitFor();
          
          // Get popup menus
          const memLocationWinPopups = memLocDialog.popupButtons.allItems;
          
          //Set marker time reference
          const referencePopup = memLocationWinPopups[0];
          
          referencePopup.popupMenuSelect({
              menuPath: [markerReference],
          })
          
          // Set ruler destination
          const rulerPopup = memLocationWinPopups[1];
          
          rulerPopup.popupMenuSelect({
              menuPath: [destinationRulerName],
              anchor: "TopLeft",
          })
          
          // Set color using ctrl/cmd + nummber
          sf.keyboard.press({
              keys: colorHotKeys,
          });
          
          //Set location name
          if (locationName) {
              memLocDialog.textFields.first.elementSetTextFieldWithAreaValue({
                  value: locationName,
              });
          }
          
          // Close new memory location window
          memLocDialog.buttons.whoseTitle.is("OK").first.elementClick();
          
          1. The simplest way to create a button for each ruler would be to make 4 copies of this script, change the constants at the top of them, and assign each script to a StreamDeck button.


            As you get more comfortable with SF you can convert this script into a template which uses only one script and changes the constants via event.props

            1. In reply toChris_Shaw:
              Chris Tarry @Chris_Tarry
                2025-01-11 17:41:49.805Z

                Hi @Chris_Shaw, I'm new here and kind of jumping in on this thread. I'm trying to run the script you posted here for auto-naming and coloring markers and I keep getting the following error when I run it. "Element was not found or removed after waiting".. Not sure what I'm doing wrong, any suggestions? Thanks!

                1. Which version of PT are you running? The above script seems to be working for me on 2024.10

                  1. Chris Tarry @Chris_Tarry
                      2025-01-11 18:53:40.224Z

                      2024.3, figured it was a new enough version. I'll update it and see what happens.

                      1. IF you get the erorr again, look in the soundflow log (accessible through the SF menubar icon). It should tell you the line number where the error is occurring

                        1. Chris Tarry @Chris_Tarry
                            2025-01-11 19:24:19.933Z

                            That was it, updated ProTools and all works great! It's always the answer. Thanks for your help, here and on the Jump Timeline thread as well. Really appreciate it!

                  2. A
                    In reply toAndrej_Bako:
                    Andrej Bako @Andrej_Bako
                      2024-04-15 17:18:33.283Z

                      thank you so much @Chris_Shaw this is exactly what I was looking for, super appreciate all your help 🙏🏽

                      1. J
                        In reply toAndrej_Bako:
                        Joe Pileggi @Joe_Pileggi
                          2024-07-11 17:26:15.052Z

                          @Chris_Shaw I just stumbled upon this script which is great. I was wondering is there a way to modify so that the Location Name is variable and the specific name can be input while creating the marker? Thanks! Joe

                          1. Sure:

                            const destinationRulerName = "Markers 3"
                            const markerReference = "Absolute" // or "Bar | Beat"
                            const colorHotKeys = "ctrl+6" // or "cmd+1" etc
                            // const locationName = "Hey There!" // if quotes are empty ("") then script will use default name
                            
                            // Get marker name from user
                            const locationName = sf.interaction.displayDialog({
                                prompt:"Enter location name",
                                defaultAnswer:""
                            }).text
                            
                            // Create Marker
                            sf.keyboard.press({ keys: "numpad enter" });
                            
                            // Wait for new memory location window
                            const memLocDialog = sf.ui.proTools.newMemoryLocationDialog;
                            
                            memLocDialog.elementWaitFor();
                            
                            // Get popup menus
                            const memLocationWinPopups = memLocDialog.popupButtons.allItems;
                            
                            //Set marker time reference
                            const referencePopup = memLocationWinPopups[0];
                            
                            referencePopup.popupMenuSelect({
                                menuPath: [markerReference],
                            })
                            
                            // Set ruler destination
                            const rulerPopup = memLocationWinPopups[1];
                            
                            rulerPopup.popupMenuSelect({
                                menuPath: [destinationRulerName],
                                anchor: "TopLeft",
                            })
                            
                            // Set color using ctrl/cmd + nummber
                            sf.keyboard.press({
                                keys: colorHotKeys,
                            });
                            
                            //Set location name
                            if (locationName) {
                                memLocDialog.textFields.first.elementSetTextFieldWithAreaValue({
                                    value: locationName,
                                });
                            }
                            
                            // Close new memory location window
                            memLocDialog.buttons.whoseTitle.is("OK").first.elementClick();
                            
                            
                            1. CChris Testa @Chris_Testa
                                2024-09-18 19:47:07.621Z

                                Hey Chris,

                                I'm running 2024.3 and I just installed this and I'm using it. Amazing. Just curious, is there a way to populate the location name with the current timecode of the marker? So I hit my button, the "Enter Location Name" dialogue box pops up and instead of it being blank, it populates with the current timecode and then I can continue with my own naming after the timecode in that window, then hit "Ok" and let it finish? OR, is there a way to add the current timecode to the marker name after naming the location in the pop up window?

                                1. I've been using this piece of code to nab the TC and covert to string... i have it set to lose the : because I've been using it for file naming.

                                  function tcIn() {
                                      //Get the selections in & out points.
                                      const selection = sf.ui.proTools.selectionGet();
                                  
                                      //Format the Timecode in and out string " - " + Timecode in point + " - " + Timecode out point + " "
                                      let timecodeInAndOut = `${selection.selectionStart}`.replace(/:/g, '');
                                  
                                      return timecodeInAndOut
                                  
                                  }
                                  

                                  Roling that into this should look something like this :

                                  function tcIn() {
                                      //Get the selections in & out points.
                                      const selection = sf.ui.proTools.selectionGet();
                                  
                                      //Format the Timecode in and out string " - " + Timecode in point + " - " + Timecode out point + " "
                                      let timecodeInAndOut = `${selection.selectionStart}`.replace(/:/g, '');
                                  
                                      return timecodeInAndOut
                                  
                                  }
                                  
                                  const destinationRulerName = "Markers 3"
                                  const markerReference = "Absolute" // or "Bar | Beat"
                                  const colorHotKeys = "ctrl+6" // or "cmd+1" etc
                                  const currentStartTc = tcIn()
                                  // const locationName = "Hey There!" // if quotes are empty ("") then script will use default name
                                  
                                  // Get marker name from user
                                  const locationName = sf.interaction.displayDialog({
                                      prompt:"Enter location name",
                                      defaultAnswer: currentStartTc
                                  }).text
                                  
                                  // Create Marker
                                  sf.keyboard.press({ keys: "numpad enter" });
                                  
                                  // Wait for new memory location window
                                  const memLocDialog = sf.ui.proTools.newMemoryLocationDialog;
                                  
                                  memLocDialog.elementWaitFor();
                                  
                                  // Get popup menus
                                  const memLocationWinPopups = memLocDialog.popupButtons.allItems;
                                  
                                  //Set marker time reference
                                  const referencePopup = memLocationWinPopups[0];
                                  
                                  referencePopup.popupMenuSelect({
                                      menuPath: [markerReference],
                                  })
                                  
                                  // Set ruler destination
                                  const rulerPopup = memLocationWinPopups[1];
                                  
                                  rulerPopup.popupMenuSelect({
                                      menuPath: [destinationRulerName],
                                      anchor: "TopLeft",
                                  })
                                  
                                  // Set color using ctrl/cmd + nummber
                                  sf.keyboard.press({
                                      keys: colorHotKeys,
                                  });
                                  
                                  //Set location name
                                  if (locationName) {
                                      memLocDialog.textFields.first.elementSetTextFieldWithAreaValue({
                                          value: locationName,
                                      });
                                  }
                                  
                                  // Close new memory location window
                                  memLocDialog.buttons.whoseTitle.is("OK").first.elementClick();
                                  

                                  If you want to keep the : in the TC name just remove .replace(/:/g, ''); from line 6

                                  1. CChris Testa @Chris_Testa
                                      2024-09-18 23:07:36.239Z

                                      Wow! Thanks so much. Trying now!

                                      1. CChris Testa @Chris_Testa
                                          2024-09-18 23:11:14.851Z

                                          this is what I have now and nothing has changed from the original script. am I missing something? thanks.

                                          function tcIn() {
                                          //Get the selections in & out points.
                                          const selection = sf.ui.proTools.selectionGet();

                                          //Format the Timecode in and out string " - " + Timecode in point + " - " + Timecode out point + " "
                                          let timecodeInAndOut = `${selection.selectionStart}`.replace(/:/g, '');
                                          
                                          return timecodeInAndOut
                                          

                                          }

                                          const destinationRulerName = "AUDIO PULLS"
                                          const markerReference = "Absolute"
                                          const colorHotKeys = "ctrl+2"
                                          const locationName = "pull"

                                          // Get marker name from user
                                          const locationName = sf.interaction.displayDialog({
                                          prompt:"Enter location name",
                                          defaultAnswer:""
                                          }).text

                                          // Create Marker
                                          sf.keyboard.press({ keys: "numpad enter" });

                                          // Wait for new memory location window
                                          const memLocDialog = sf.ui.proTools.newMemoryLocationDialog;

                                          memLocDialog.elementWaitFor();

                                          // Get popup menus
                                          const memLocationWinPopups = memLocDialog.popupButtons.allItems;

                                          //Set marker time reference
                                          const referencePopup = memLocationWinPopups[0];

                                          referencePopup.popupMenuSelect({
                                          menuPath: [markerReference],
                                          })

                                          // Set ruler destination
                                          const rulerPopup = memLocationWinPopups[1];

                                          rulerPopup.popupMenuSelect({
                                          menuPath: [destinationRulerName],
                                          anchor: "TopLeft",
                                          })

                                          // Set color using ctrl/cmd + nummber
                                          sf.keyboard.press({
                                          keys: colorHotKeys,
                                          });

                                          //Set location name
                                          if (locationName) {
                                          memLocDialog.textFields.first.elementSetTextFieldWithAreaValue({
                                          value: locationName,
                                          });
                                          }

                                          // Close new memory location window
                                          memLocDialog.buttons.whoseTitle.is("OK").first.elementClick();

                                          1. CChris Testa @Chris_Testa
                                              2024-09-18 23:12:01.631Z

                                              Sorry, I'm not sure how to copy a script into the forum

                                              1. All good @Chris_Testa here's that info for future reference How to quote code in the SoundFlow forum.

                                                You're close, but basically although you added the function for pulling the TC you didn't call it (my line 15) or use that const afterward (my line 21 defaultAnswer within the prompt.)

                                                function tcIn() {
                                                    //Get the selections in & out points.
                                                    const selection = sf.ui.proTools.selectionGet();
                                                
                                                    //Format the Timecode in and out string " - " + Timecode in point + " - " + Timecode out point + " "
                                                    let timecodeInAndOut = `${selection.selectionStart}`.replace(/:/g, '');
                                                
                                                    return timecodeInAndOut
                                                }
                                                
                                                const destinationRulerName = "AUDIO PULLS"
                                                const markerReference = "Absolute"
                                                const colorHotKeys = "ctrl+2"
                                                const startTC = tcIn()
                                                /* const locationName = "pull " + startTC */ ///USE THIS OR THE PROMPT 18-22 not both...
                                                
                                                // Get marker name from user
                                                const locationName = sf.interaction.displayDialog({
                                                    prompt: "Enter location name",
                                                    defaultAnswer: startTC ///this is where we use the start TC info to populate the default answer
                                                }).text
                                                
                                                // Create Marker
                                                sf.keyboard.press({ keys: "numpad enter" });
                                                
                                                // Wait for new memory location window
                                                const memLocDialog = sf.ui.proTools.newMemoryLocationDialog;
                                                
                                                memLocDialog.elementWaitFor();
                                                
                                                // Get popup menus
                                                const memLocationWinPopups = memLocDialog.popupButtons.allItems;
                                                
                                                //Set marker time reference
                                                const referencePopup = memLocationWinPopups[0];
                                                
                                                referencePopup.popupMenuSelect({
                                                    menuPath: [markerReference],
                                                })
                                                
                                                // Set ruler destination
                                                const rulerPopup = memLocationWinPopups[1];
                                                
                                                rulerPopup.popupMenuSelect({
                                                    menuPath: [destinationRulerName],
                                                    anchor: "TopLeft",
                                                })
                                                
                                                // Set color using ctrl/cmd + nummber
                                                sf.keyboard.press({
                                                    keys: colorHotKeys,
                                                });
                                                
                                                //Set location name
                                                if (locationName) {
                                                    memLocDialog.textFields.first.elementSetTextFieldWithAreaValue({
                                                        value: locationName,
                                                    });
                                                }
                                                
                                                // Close new memory location window
                                                memLocDialog.buttons.whoseTitle.is("OK").first.elementClick();
                                                

                                                Here is the code using your constants in lines 11-13
                                                You can see line 14 we're adding in using the tcIn function to create the const startTC

                                                you can only have one const locationName so you can see I've commented out the fixed name at line 15 so you can use the prompt from line 18. Within that prompt at line 20 is the defaultAnswer: startTC in your previous script default answer was simply nothing. we are now telling the script hey make that startTC the default answer now, so when the prompt appears on your screen it will already be populated with the timecode.

                                                Hope that helps,
                                                Owen

                                                1. CChris Testa @Chris_Testa
                                                    2024-09-24 22:23:40.142Z

                                                    Finally getting to this. Ahh. Works perfectly. Thank you again for all your help.

                                                    1. CChris Testa @Chris_Testa
                                                        2024-09-24 23:08:31.086Z

                                                        Such an enormous help. Thank you again.

                                                        1. CChris Testa @Chris_Testa
                                                            2024-09-25 21:01:41.667Z

                                                            Hey Owen,

                                                            I have one more request. When I hit my button the "Enter Location name" window pops up with the full timecode but the timecode is highlighted. Is there anyway to add a ">" and a "space" so I can instantly type in what I need? Just not sure where to enter that. thank you.

                                                            1. Let's approach it differently, can you post what your marker would look like ideally if you did it manually and the part of the marker you want as Variable text just type in all caps VARIABLE so mayb it's 'Prefix - VARIABLE - Timecode' or just 'VARIABLE Timecode' whatever it is from there we can back track into not needing the timecode to even be in the popup box but only in the final location name. Sense making?

                                                              1. CChris Testa @Chris_Testa
                                                                  2024-09-26 18:21:33.543Z

                                                                  That makes sense. So I included a picture of what happens now when I hit my "Audio Pulls" button in Soundflow and what ideally I would like to have. Basically just saving two buttons. I'm down for it to work either way... in the end it would be great to have the final read something like this... "00:59:40:00 pull John"

                                                                  This is how it looks now....

                                                                  This is how I'd like it to look

                                                                  1. I think you're missing my point... you don't need it have the TC in the dialog box at all, we can prepend it afterwards instead of messing around with extra key strokes inside dialog boxes.

                                                                    function tcIn() {
                                                                        //Get the selections in & out points.
                                                                        const selection = sf.ui.proTools.selectionGet();
                                                                    
                                                                        //Format the Timecode in and out string " - " + Timecode in point + " - " + Timecode out point + " "
                                                                        let timecodeInAndOut = `${selection.selectionStart}`;
                                                                    
                                                                        return timecodeInAndOut
                                                                    }
                                                                    
                                                                    const destinationRulerName = "AUDIO PULLS"
                                                                    const markerReference = "Absolute"
                                                                    const colorHotKeys = "ctrl+2"
                                                                    const startTC = tcIn()
                                                                    /* const locationName = "pull " + startTC */ ///USE THIS OR THE PROMPT 18-22 not both...
                                                                    
                                                                    // Get marker name from user
                                                                    const locationName = sf.interaction.displayDialog({
                                                                        prompt: "Enter location name",
                                                                        defaultAnswer: ""
                                                                    }).text
                                                                    
                                                                    // Create Marker
                                                                    sf.keyboard.press({ keys: "numpad enter" });
                                                                    
                                                                    // Wait for new memory location window
                                                                    const memLocDialog = sf.ui.proTools.newMemoryLocationDialog;
                                                                    
                                                                    memLocDialog.elementWaitFor();
                                                                    
                                                                    // Get popup menus
                                                                    const memLocationWinPopups = memLocDialog.popupButtons.allItems;
                                                                    
                                                                    //Set marker time reference
                                                                    const referencePopup = memLocationWinPopups[0];
                                                                    
                                                                    referencePopup.popupMenuSelect({
                                                                        menuPath: [markerReference],
                                                                    })
                                                                    
                                                                    // Set ruler destination
                                                                    const rulerPopup = memLocationWinPopups[1];
                                                                    
                                                                    rulerPopup.popupMenuSelect({
                                                                        menuPath: [destinationRulerName],
                                                                        anchor: "TopLeft",
                                                                    })
                                                                    
                                                                    // Set color using ctrl/cmd + nummber
                                                                    sf.keyboard.press({
                                                                        keys: colorHotKeys,
                                                                    });
                                                                    
                                                                    //Set location name
                                                                    if (locationName) {
                                                                        memLocDialog.textFields.first.elementSetTextFieldWithAreaValue({
                                                                            value: startTC + ' ' + locationName,
                                                                        });
                                                                    }
                                                                    
                                                                    // Close new memory location window
                                                                    memLocDialog.buttons.whoseTitle.is("OK").first.elementClick();
                                                                    

                                                                    So here, your dialog box will be blank and then you can put whatever note you want. (that change was made on line 20.) And then after you've pressed enter on your confirmation box --> on line 57 you can see we set the value of the location name as startTC + ' ' + locationName ... heck if you wanted it could be startTC + ' pull ' + locationName so you'd just have to type the characters name every time, save you even 4 more button presses :P

                                                                    1. CChris Testa @Chris_Testa
                                                                        2024-09-26 19:27:34.107Z

                                                                        Love it. Trying it now. thank you.

                                                                        1. CChris Testa @Chris_Testa
                                                                            2024-09-26 19:32:29.352Z

                                                                            I added the "pull" beautiful. Thank you so much again. All this stuff really makes me want to learn how to script. Thank you again. chris

                                                                            1. haha yeah it gets pretty fun. Here's an even cuter version.

                                                                              ///Character Lookup Table
                                                                              const characterData = [
                                                                                  'John',
                                                                                  'Frank',
                                                                                  'Sally'
                                                                              ]
                                                                              
                                                                              function tcIn() {
                                                                                  //Get the selections in & out points.
                                                                                  const selection = sf.ui.proTools.selectionGet();
                                                                              
                                                                                  //Format the Timecode in and out string " - " + Timecode in point + " - " + Timecode out point + " "
                                                                                  let timecodeInAndOut = `${selection.selectionStart}`;
                                                                              
                                                                                  return timecodeInAndOut
                                                                              }
                                                                              
                                                                              const destinationRulerName = "AUDIO PULLS"
                                                                              const markerReference = "Absolute"
                                                                              const colorHotKeys = "ctrl+2"
                                                                              const startTC = tcIn()
                                                                              
                                                                              const characterName = sf.interaction.popupSearch({
                                                                                  title: `Select a Character`,
                                                                                  items: characterData.map(character => ({ name: character })),
                                                                                  onCancel: 'Abort',
                                                                              }).item.name;
                                                                              
                                                                              // Create Marker
                                                                              sf.keyboard.press({ keys: "numpad enter" });
                                                                              
                                                                              // Wait for new memory location window
                                                                              const memLocDialog = sf.ui.proTools.newMemoryLocationDialog;
                                                                              
                                                                              memLocDialog.elementWaitFor();
                                                                              
                                                                              // Get popup menus
                                                                              const memLocationWinPopups = memLocDialog.popupButtons.allItems;
                                                                              
                                                                              //Set marker time reference
                                                                              const referencePopup = memLocationWinPopups[0];
                                                                              
                                                                              referencePopup.popupMenuSelect({
                                                                                  menuPath: [markerReference],
                                                                              })
                                                                              
                                                                              // Set ruler destination
                                                                              const rulerPopup = memLocationWinPopups[1];
                                                                              
                                                                              rulerPopup.popupMenuSelect({
                                                                                  menuPath: [destinationRulerName],
                                                                                  anchor: "TopLeft",
                                                                              })
                                                                              
                                                                              // Set color using ctrl/cmd + nummber
                                                                              sf.keyboard.press({
                                                                                  keys: colorHotKeys,
                                                                              });
                                                                              
                                                                              //Set location name
                                                                              if (characterName) {
                                                                                  memLocDialog.textFields.first.elementSetTextFieldWithAreaValue({
                                                                                      value: startTC + ' pull ' + characterName,
                                                                                  });
                                                                              }
                                                                              
                                                                              // Close new memory location window
                                                                              memLocDialog.buttons.whoseTitle.is("OK").first.elementClick();
                                                                              

                                                                              Just set your character names in that top lookup table. See what you think of that.

                                                                              1. CChris Testa @Chris_Testa
                                                                                  2024-09-26 19:51:28.961Z

                                                                                  Holy s**t. You're nuts. This is amazing. Man I am surprised more and more every day by Soundflow. Totally love it. Thank you. Amazing.

                                                                                  1. CChris Testa @Chris_Testa
                                                                                      2024-10-04 19:42:24.845Z

                                                                                      Hey Owen,

                                                                                      I got one more for you if it's possible. The character's list is really awesome but sometimes I want to add a specific comment to that character or, let's say I just want to add my own comment. Is there a way to hit my button which will pull up that list but within that list there is an option to add my own comment? That would be really helpful because then I can have one dedicated button for that task.

                                                                                      1. If I recall correctly, all this tech came from another @Chris_Shaw script here Create new tracks and rename it with soundflow prompt typing manually and selecting words from a predefined lists

                                                                                        And it had that working ... so big ups to OP solver @Chris_Shaw here's a version where you can skip the character if you want or not and then add a note or not. It will mean one more click every time but it gives you more flexibility. It will always prepend TC and Pull.... coding that out when you choose to put your own note without character in is more coding than I have time for today ;)

                                                                                        const destinationRulerName = "AUDIO PULLS"
                                                                                        const markerReference = "Absolute"
                                                                                        const colorHotKeys = "ctrl+2"
                                                                                        const startTC = tcIn()
                                                                                        
                                                                                        const charcaterNames = {
                                                                                        
                                                                                            character:
                                                                                                [
                                                                                                    '<NONE>',
                                                                                                    'John',
                                                                                                    'Frank',
                                                                                                    'Sally'
                                                                                                ],
                                                                                            note: [
                                                                                                '<NONE>',
                                                                                                'ENTER NOTE'
                                                                                            ]
                                                                                        }
                                                                                        
                                                                                        var selectedTrackNameItems = []
                                                                                        
                                                                                        // Enter / select track name items
                                                                                        for (const i in charcaterNames) {
                                                                                            var selectedNameItem = sf.interaction.popupSearch({
                                                                                                title: `Select/Search/Enter ${i} name`,
                                                                                                items: charcaterNames[i].map(item => ({ name: item })),
                                                                                                onCancel: 'Abort',
                                                                                            }).item.name;
                                                                                        
                                                                                            if (selectedNameItem == "<NONE>") selectedNameItem = "";
                                                                                        
                                                                                            if (selectedNameItem == "ENTER NOTE") {
                                                                                                selectedNameItem = sf.interaction.displayDialog({
                                                                                                    title: `Name ${i}`,
                                                                                                    prompt: `Enter ${i} name`,
                                                                                                    defaultAnswer: `<${i}>`,
                                                                                                    buttons: ["Cancel", "OK"],
                                                                                                    defaultButton: "OK",
                                                                                                }).text
                                                                                            };
                                                                                            selectedTrackNameItems.push(selectedNameItem)
                                                                                        };
                                                                                        
                                                                                        // Join all selectedTrackNameItems to create newTrackName
                                                                                        var userMarkerName = selectedTrackNameItems.join(" ")
                                                                                        
                                                                                        function tcIn() {
                                                                                            //Get the selections in & out points.
                                                                                            const selection = sf.ui.proTools.selectionGet();
                                                                                        
                                                                                            //Format the Timecode in and out string " - " + Timecode in point + " - " + Timecode out point + " "
                                                                                            let timecodeInAndOut = `${selection.selectionStart}`;
                                                                                        
                                                                                            return timecodeInAndOut
                                                                                        }
                                                                                        
                                                                                        
                                                                                        
                                                                                        // Create Marker
                                                                                        sf.keyboard.press({ keys: "numpad enter" });
                                                                                        
                                                                                        // Wait for new memory location window
                                                                                        const memLocDialog = sf.ui.proTools.newMemoryLocationDialog;
                                                                                        
                                                                                        memLocDialog.elementWaitFor();
                                                                                        
                                                                                        // Get popup menus
                                                                                        const memLocationWinPopups = memLocDialog.popupButtons.allItems;
                                                                                        
                                                                                        //Set marker time reference
                                                                                        const referencePopup = memLocationWinPopups[0];
                                                                                        
                                                                                        referencePopup.popupMenuSelect({
                                                                                            menuPath: [markerReference],
                                                                                        })
                                                                                        
                                                                                        // Set ruler destination
                                                                                        const rulerPopup = memLocationWinPopups[1];
                                                                                        
                                                                                        rulerPopup.popupMenuSelect({
                                                                                            menuPath: [destinationRulerName],
                                                                                            anchor: "TopLeft",
                                                                                        })
                                                                                        
                                                                                        // Set color using ctrl/cmd + nummber
                                                                                        sf.keyboard.press({
                                                                                            keys: colorHotKeys,
                                                                                        });
                                                                                        
                                                                                        //Set location name
                                                                                        if (userMarkerName) {
                                                                                            memLocDialog.textFields.first.elementSetTextFieldWithAreaValue({
                                                                                                value: startTC + ' pull ' + userMarkerName,
                                                                                            });
                                                                                        }
                                                                                        
                                                                                        // Close new memory location window
                                                                                        memLocDialog.buttons.whoseTitle.is("OK").first.elementClick();
                                                                                        
                                                                                        1. CChris Testa @Chris_Testa
                                                                                            2024-10-04 23:11:02.908Z

                                                                                            Of course. Wow. thanks again. I'll check it all out. thank you. c

                                                            2. J
                                                              In reply toAndrej_Bako:
                                                              Joe Pileggi @Joe_Pileggi
                                                                2024-07-11 20:28:16.899Z

                                                                @Chris_Shaw Thank you!! This is perfect!!!