No internet connection
  1. Home
  2. Support

Could not click open close folder Line 3 error

By Michael Keeley @Michael_Keeley
    2021-01-28 23:50:18.398Z

    Could not click open close folder Line 3 error

    System Information

    SoundFlow 4.1.10

    OS: darwin 19.6.0

    ProductName: Mac OS X
    ProductVersion: 10.15.7
    BuildVersion: 19H15

    Steps to Reproduce

    1. on the iOS iPad press open for ex Braams folder
    2. Get an error stating that it could not open folder line 3
    3. Click button action requires ui element
    4. Screen Shot 2021-01-28 at 3.28.33 PM

    Expected Result

    It worked when I created a new folder, but after 4 mins of using it it went back to this error

    here is the code

    sf.ui.proTools.appActivateMainWindow();

    sf.ui.proTools.invalidate().trackGetByName({ name: "•Braams•" }).track.folderTrackSetOpen({
    targetValue: 'Toggle',
    });

    Actual Result

    get error code

    Workaround

    create a new 7.1.2 routing folder and relable so it matches the code

    Other Notes

    I'm trying to find a good way to have a list of all of my folders on the ipad so that when I press for ex Cyms it opens the cyms folder.

    Also is there a way to close all of the folders ?? This would be great to have I have copied a couple of the scripts on the forum and they dont work.

    Screen Shot 2021-01-25 at 9.02.41 PM


    Links

    User UID: gD4In9Ho4DW37egqVbcQxiK6Fh53

    Feedback Key: sffeedback:gD4In9Ho4DW37egqVbcQxiK6Fh53:-MSAOtrDWM_RfZ4OwrV4

    Feedback ZIP

    • 2 replies
    1. Hey Michael!

      I'm pretty sure you're getting this error because the track height of the folder track is either mini or micro. At those small track heights, the script you were using isn't able to find the open/close button, therefore failing. Below is an alternative:

      // Enter track name here:
      const trackName = "•Braams•";
      
      /**@param {AxPtTrackHeader} track */
      function toggleFolderThroughPopupMenu(track) {
          // Make sure we're on the Edit window.
          if (!sf.ui.proTools.getMenuItem("Window", "Edit").isMenuChecked) {
              sf.ui.proTools.menuClick({
                  menuPath: ["Window", "Edit"],
              })
          };
      
          // Scroll to track
          track.trackScrollToView();
      
          // Open/Close folder
          track.popupButtons.whoseTitle.is("Track options").first.popupMenuSelect({
              menuSelector: m => m[m.length - 1],
          })
      };
      
      function main() {
          sf.ui.proTools.appActivateMainWindow();
      
          const track = sf.ui.proTools.invalidate().trackGetByName({ name: trackName }).track;
      
          try { // ... to open with the preferred method
              track.folderTrackSetOpen({
                  targetValue: 'Toggle',
              });
          } catch (e) { // If it fails, try the popup menu method
              toggleFolderThroughPopupMenu(track);
          };
      };
      
      main();
      

      This script will first try to do it the way you had it. If that doesn't work, it will try to do it another way (through the popup menus of that track).

      I personally prefer the original way since that method can open/close the folder from anywhere in the session, even in the Mix window (as long as the Edit window is also open). It feels more like a built-in feature. The second method needs to see the track on screen before it can open/close the folder, so you'll see it do a few things before actually getting to the folder.

      So I guess my suggestion would be to keep the folder height at "small" or larger.

      Hope that helps!

      1. M
        In reply toMichael_Keeley:
        Michael Keeley @Michael_Keeley
          2021-01-29 19:30:18.759Z

          This works great! Thanks so much!