No internet connection
  1. Home
  2. How to

Wait for mouse click command

By Alexandre Hirlinger @Alexandre_Hirlinger
    2021-09-24 16:57:29.091Z

    Hello! I'm new to the soundflow community, coming over from Keyboard Maestro. I love the functionality that Soundflow provides, but I'm trying to wrap my head around some of its features. I'm trying to emulate this macro that I use in Keyboard Maestro which selects all following

    clips in Object mode, which is extremely useful for dialogue editing.

    Is there any way to have soundflow wait for a mouse click before executing the rest of a macro?

    I have attached the keybaord maestro macro that I use, but I'm getting hung up on how to program the macro to wait for my mouse click (which is usually where I click and drag the selection to wherever it needs to go) before switching me back to the smart tool.

    Any help would be greatly appreciated. Thanks!

    • 9 replies
    1. I should add - i'm not too familiar with scripting, so I'd love to be able to keep this as a macro if possible. I know enough about scripts to copy and paste them and change very basic objects.

      1. AAndrew Sherman @Andrew_Sherman
          2021-09-28 17:57:46.094Z

          I'm not aware of a wait for mouse click macro, perhaps you can add that as a new feature request / idea. However I too came from Keyboard maestro and I find Soundflow far superior once you get into the scripting side, and it's actually not that bad once you try a few things. it does take some trial and error but I find it's well worth it.

          Also worth adding that if you are wanting to do something specific, there's often a better way of doing it than just using keyboard button-press simulation, more robust and reliable etc. I don't know what you're trying to do here but if you elaborate on your aims you might find somebody can offer an alternate approach

          1. ^^ This.

            Here's two videos showing how to go from Keyboard simulation to UI automation:

            1. Thank you Christian! I've been doing some more learning on soundflow over the last couple days and I've started to replace most of my keyboard strokes with UI emulation when possible. This helped a lot. I've been working my way through all your learning videos on your youtube!

              1. Wonderful! :) Happy to hear it :)

            2. In reply toAndrew_Sherman:

              Thanks for the input Andrew!

              Basically, I do a lot of diolgue work for podcasts, interviews, etc. I like stripping the silence in the files and working with multiple non-contiguous clips on different tracks that are grouped together. I use the select all following command a lot, and then move the dialogue around, but I don't like using it in the time grabber mode, bc it can sometimes not play well with clip start/ends that aren't at the same place in the timeline, so I use the object mode instead. I'm recreate my Keyboard Maestro macro that will do the following:

              Done before the macro begins: select desired clip

              1. Ensure that Groups are on
              2. Switch the Grabber tool into Object Mode
              3. Wait until I make a selection (to move the selected clips) aka in Keyboard Maestro, Pause until all conditions are true: "Click - Left Button"
              4. Select all Following Clips
              5. Wait until I move the selection (aka the same "pause until" condition as before)
              6. Return my Tool back to the smart tool
              7. Return Groups to the previous state

              Hopefully that provides a little bit of clarity!

            3. AAndrew Sherman @Andrew_Sherman
                2021-09-28 17:59:39.014Z

                Is this related to what you're looking for?

              • For waiting for a mouse click, this is not something SF supports today.

                You have a few options:

                • Instead, add some other break in your SF script, for example an alert('Click OK when you want to continue')
                • Wait for the state change to happen in the app (for example, wait for clips to have been selected, or for a file to have been created, etc.)
                • Make 2 different scripts, one that runs before you make the selection, another that runs after
                • Allow the user to make the selection first and rearrange the order of events you need to automate (not always possible)

                Generally, we always recommend users to design scripts in such a way that all user input is required at the start of the script, so that the largest part of the workflow will be automated in a way where you don't have to monitor it.

                1. I believe that the second option you listed would be a solution, correct? But I think it would need to be scripted. I tried to give a little bit more clarity for what I'm going for in the post above to Andrew.

                  I'll at least add a wait for mouse click as a feature request! :)