No internet connection
  1. Home
  2. How to

Could not open popup menu...works...then it doesn't

By Jamie Bolton @Jamie_Bolton
    2024-07-31 21:27:17.410Z2024-07-31 23:19:09.253Z

    I've created a few track presets and corresponding macros to create a mono audio track and then recall each preset. Each macro works, at least sometimes. I can, for example, create two or three tracks properly, but then the macro will fail. Then it will work again a time or two, but then inevitably it will fail, and then fail permanently until I restart ProTools and Soundflow.

    An example of the macro is below.

    //Calling command "Audio Track - Mono" from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/clxwb51i90000ls10pzla3duo")
    sf.soundflow.runCommand({
        commandId: 'user:ckp49i4j60000a2100yfwywgf:ckumdk025000hph10fohx90lw#ckum77mkz0004ph106wrckbbu',
        props: {}
    });
    
    //Calling command "Recall Track Preset on Selected Track" from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/clxwb51i90000ls10pzla3duo")
    sf.soundflow.runCommand({
        commandId: 'user:ckp49i4j60000a2100yfwywgf:ckfs5niws0007v110s447k1ac',
        props: {
            trackPresetPath: ["Avid","API 4"],
        }
    });
    
    • 2 replies
    1. J
      Jamie Bolton @Jamie_Bolton
        2024-07-31 21:29:32.832Z
        1. Any time the track list changes in any way (name change, visibility change, new or deleted tracks) you need to refresh the main window cache. The first command in your script / macro changes the track list so before you run it again you'll need to refresh the main window cache by using an invalidate command.

          Try this:

          sf.ui.proTools.mainWindow.invalidate();
          
          //Calling command "Audio Track - Mono" from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/clxwb51i90000ls10pzla3duo")
          sf.soundflow.runCommand({
              commandId: 'user:ckp49i4j60000a2100yfwywgf:ckumdk025000hph10fohx90lw#ckum77mkz0004ph106wrckbbu',
              props: {}
          });
          
          //Calling command "Recall Track Preset on Selected Track" from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/clxwb51i90000ls10pzla3duo")
          sf.soundflow.runCommand({
              commandId: 'user:ckp49i4j60000a2100yfwywgf:ckfs5niws0007v110s447k1ac',
              props: {
                  trackPresetPath: ["Avid","API 4"],
              }
          });
          

          For a thorough explanation of invalidate() check out this post from Christian:
          When to use invalidate() #post-2