Script Macro issue in Waveform 8.2.0 64-bit?

Discussion about: tracktion.com
Post Reply New Topic
RELATED
PRODUCTS

Post

I've been playing with Macros today and I can't get anything to work. Perhaps I am doing something wrong however I noticed off the bat that using Waveform keyword to call function does not Validate ..for example if I wanted to do simple hello world using this code as described in User Guide:

Code: Select all

Waveform.showMessage ('Hello there');


however it does not validate until I change it to

Code: Select all

Tracktion.showMessage ('Hello there');
however when I run run that code in the Waveform it does not do anything. I have also tried this example

Code: Select all

//Rename Clips from Track
var tracks = Tracktion.getSelectedEditElements ('track');

for (var i = 0; i < tracks.length; ++i)
{
    var track = tracks[i];
    var trackName = Tracktion.getName (track);
    var clips = Tracktion.getClipsFromTracks (track);

    for (var c = 0; c < clips.length; ++c)
    {
        var clipName = trackName + " " + (c + 1);
        Tracktion.setName (clips[c], clipName);
    }
}
and that one also does nothing ... It appears that the devs had changed script keyword to Waveform but haven't updated script validator ...Not sure if anyone has reported this bug ... Any help is as always greatly appreciated :)

Beli

Post

Hi there, you should still use the

Code: Select all

Tracktion.
object to interact with things. The "Waveform" in the user guide is incorrect and I'll get that sorted.

The script you posted works for me though. Are you sure you have some tracks selected when you run it?
Try this modification and see if the message is printed:

Code: Select all

//Rename Clips from Track
var tracks = Tracktion.getSelectedEditElements ('track');

if (tracks.length == 0)
{
    Tracktion.showMessage ('Select some tracks first to use this script);
    return;
}

for (var i = 0; i < tracks.length; ++i)
{
    var track = tracks[i];
    var trackName = Tracktion.getName (track);
    var clips = Tracktion.getClipsFromTracks (track);

    for (var c = 0; c < clips.length; ++c)
    {
        var clipName = trackName + " " + (c + 1);
        Tracktion.setName (clips[c], clipName);
    }
}

Post

Yep you are right Rian ...my script works too .. I had forgotten to select the track :) ... and the message was so tiny that I missed it until have deliberately looked for it everywhere on the screen. Thanks so much!

Post Reply

Return to “Tracktion”