No internet connection
  1. Home
  2. How to

repeat n times not working

By Ronnie Van der Veer @Ronnie_Van_der_Veer
    2024-04-05 12:59:49.038Z

    hi, I am trying to make a macro that will create a marker at the beginning of each clip group on a track and then continue. I used 'repeat n times' to repeat the necessary key strokes but instead of doing all the key strokes and repeating those again from the starts its just repeating only the last keystroke it seems. So its making 4 markers on 1 locations instead of going to the next clip and create the next marker etc.. So I must have done something wrong. I also tried the script on this page ;

    Loop Until Last Clip On Track is Detected #post-2
    But it will just run 1 time and then stop . . Here is a screenshot of the macro in Soundflow:

    Solved in post #2, click to view
    • 2 replies
    1. Hi Ronnie,

      The current macro you have is a great starting point, but it will inherently be unstable because it's only relying on keystrokes and (random) wait times - instead of waiting on the actual UI elements to be ready.

      To make this more stable, you'll need to use UI automation.

      You can learn more about how to use UI automation instead of keyboard simulation in the following 2 videos:

      Reply1 LikeSolution
      1. Thank you! I replaced 'wait' for 'Wait for UI Element' and the macro works now.