No internet connection
  1. Home
  2. Support

Using "Run Command" question

By @anon6770933309
    2018-09-03 09:49:51.844Z

    More of a question than a bug report:

    Quite a lot of run command actions fail when "Select Conditions" is set to None.
    Shouldn't SF set the target app frontmost when running the run command function in SF?
    Of course we can always use...

    sf.ui.proTools.appActivateMainWindow();
    sf.wait({ intervalMs: 100 });
    

    on top of every script but just wondering what I might be missing.
    At the moment I cannot think of any scenario where I am testing a command while PT is not in foreground.

    • 2 replies
    1. Thanks for this, @Oli_Em.
      By "Run command" do you mean clicking the "Run Command" button (or the menu item) in the SF GUI app?
      As a matter of fact, the major reason why we waited implementing that button was that this would be a typical error for many users. We ended up just implementing the button anyways knowing that at some point someone would ask this question.

      The problem is, right now SF doesn't know if your command wants PT in the foreground, or any other app. I myself for instance have scripts that target Cubase, Ableton, Finder, Google Chrome and other apps, and SF has no knowledge of which of these apps any of my scripts are meant to have in foreground.

      Since triggers and commands are completely independent of each other, limiting a trigger to a certain app doesn't give the command any indication of which app should be the target. For instance, you could have multiple triggers for the same command, all limited by different apps.

      The ideal solution to the problem would be to be able to specify the target app of a command on a per-command basis or per-package basis. Or, there should be a drop down menu next to the Run Command where you could specify which app to focus before debugging the command (best option IMO).

      1. ?@anon6770933309
          2018-09-03 10:21:18.778Z

          By "Run command" do you mean clicking the "Run Command" button (or the menu item) in the SF GUI app?

          Yep.

          As a matter of fact, the major reason why we waited implementing that button was that this would be a typical error for many users. We ended up just implementing the button anyways knowing that at some point someone would ask this question.

          Yeah, thought so.

          The problem is, right now SF doesn't know if your command wants PT in the foreground, or any other app. I myself for instance have scripts that target Cubase, Ableton, Finder, Google Chrome and other apps, and SF has no knowledge of which of these apps any of my scripts are meant to have in foreground.

          Well, I thought that the target would be whatever app we select in the "Choose Application" column but then again if "All Applications" is selected it would still fail.

          The ideal solution to the problem would be to be able to specify the target app of a command on a per-command basis or per-package basis. Or, there should be a drop down menu next to the Run Command where you could specify which app to focus before debugging the command (best option IMO).

          I am with you, pick whatever you think may work best. I can live with the

          sf.ui.proTools.appActivateMainWindow();
          

          workaround as I use the run command feature for debugging purposes only. 😉