No internet connection
  1. Home
  2. How to

Problem with Data entry into fields in the Event Operations Window in Pro Tools

By Simon Franglen @Simon_Franglen
    2021-04-05 10:36:40.416Z

    I’m building a Pro Tools surface with a graphical interface to give me the sort of options that Logic and Cubase have with midi operations. I’m having a real problem with data entry into numerical fields in the :Event: Event Operations: Select/Split Notes Window.
    I've taken an excerpt and added some code to select the right window for you immediately.

    As you can see from the checkbox, it will allow that entry. I can enter numbers into the Low Velocity field by brute force but not with elementSetTextField… (either flavour).

    var velLow = prompt("Low Velocity", '22')
    
    sf.ui.proTools.appActivateMainWindow();
    
    sf.ui.proTools.menuClick({
        menuPath: ["Event", "Event Operations", "Select/Split Notes..."],
    });
    
    sf.ui.proTools.windows.whoseTitle.is("Event Operations").first.popupButtons [0].popupMenuSelect({
        menuPath: ["Select/Split Notes"],
    });
    sf.ui.proTools.windows.whoseTitle.is("Event Operations").first.checkBoxes.whoseTitle.is("Velocity between").first.checkboxSet({ targetValue: 'Enable' });
    
    //Velocity Low
    sf.ui.proTools.windows.whoseTitle.is("Event Operations").first.textFields.allItems[4].elementClick(),
    
    sf.keyboard.press({
        keys: "delete",
    });
    
    sf.keyboard.type({text: velLow});
    

    But I can’t use

    sf.ui.proTools.windows.whoseTitle.is("Event Operations").first.textFields.allItems[4].elementSetTextFieldWithAreaValue({
        value: velLow,
    

    Or

    sf.ui.proTools.windows.whoseTitle.is("Event Operations").first.textFields.allItems[4].elementSetTextAreaValue ({
        value: velLow,
    });
    
    

    It just won’t enter anything into the field. I’ve tried adding +0 to make sure it’s numerical etc…

    Any help appreciated

    Solved in post #2, click to view
    • 2 replies
    1. samuel henriques @samuel_henriques
        2021-04-05 11:21:16.865Z

        hello @Simon_Franglen,

        some of these text areas need a bit of help, try this:

        sf.ui.proTools.windows.whoseTitle.is("Event Operations").first.textFields.allItems[4].elementSetTextFieldWithAreaValue({
            value: velLow,
            useMouseKeyboard: true,
        });
        
        ReplySolution
        1. S
          In reply toSimon_Franglen:
          Simon Franglen @Simon_Franglen
            2021-04-05 11:49:42.964Z

            Awesome thank you so much.