No internet connection
  1. Home
  2. Macro and Script Help

How to consolidate multiple clips on a track, count the number of consolidated clips and report it?

By Jan Kerscher @Jan_Kerscher
    2022-04-27 19:16:16.583Z

    Title

    How to consolidate multiple clips on a track, count the number of consolidated clips and report it?

    What do you expect to happen when you run the script/macro?

    I want this script to consolidate selected clips in one audio track to make NEW but SINGLE clips. Usually The "consolidate" command would just consolidate time on a track. But i want this one to make 16 new "full clips" if there were 16 trimmed clips on a track for example.

    Are you seeing an error?

    What happens when you run this script?

    It works as of now. But at the end of the loop i always get the error message, that "selecting a full clip" failed. But it's just at the end of the loop.

    I would like the script to count the number of clips that it consolidated and then state: "I consolidated x clips".

    How can i do that?

    How were you running this script?

    I used a keyboard shortcut within the target app

    How important is this issue to you?

    3

    Details

    {
        "inputExpected": "I want this script to consolidate selected clips in one audio track to make NEW but SINGLE clips. Usually The \"consolidate\" command would just consolidate time on a track. But i want this one to make 16 new \"full clips\" if there were 16 trimmed clips on a track for example.",
        "inputIsError": true,
        "inputWhatHappens": "It works as of now.\nBut at the end of the loop i always get the error message, that \"selecting a full clip\" failed. But it's just at the end of the loop.\n\nI would like the script to count the number of clips that it consolidated and then state: \"I consolidated x clips\".\n\nHow can i do that?",
        "inputHowRun": {
            "key": "-Mpfwh4RkPLb2LPwjePT",
            "title": "I used a keyboard shortcut within the target app"
        },
        "inputImportance": 3,
        "inputTitle": "How to consolidate multiple clips on a track, count the number of consolidated clips and report it?\n"
    }

    Source

    sf.ui.proTools.clipDoForEachSelectedClip({ 
        action: clip => Consolidate()
       
       
    });
    
    function Consolidate() 
    {
    sf.ui.proTools.clipConsolidate();
    }
    
    
    

    Links

    User UID: gKnK5fmaqQMsgjDPruu5U1QP6Hf1

    Feedback Key: sffeedback:gKnK5fmaqQMsgjDPruu5U1QP6Hf1:-N0gRyLOrzYa91xhR2YL

    Feedback ZIP

    • 1 replies
    1. J
      Jocelyn Scofield @Jocelyn_Scofield
        2023-10-04 22:13:42.477Z

        Hi Jan. I am interested in this script as well. I need to consolidate individual clips in a single track. Is there more to the script than what you put here in "source"? I am wondering what you selected to get this to run? Thank you!