Skip to content

Conversation

@JKWTCN
Copy link

@JKWTCN JKWTCN commented Oct 24, 2025

No description provided.

- Change AudioClipCollection indexer to return AudioClip instead of AudioClipCollection.
- Change index signature from `readonly index` to `readonly [index: number]`
- Ensure audio tracks are correctly accessible via numeric index
- Conform to standard TypeScript index signature syntax
Add command to trim clip head and tail to playhead position

Add command to rename selected item

Add command to browse and run script files

Add command to close current document

Add command to relink all offline media files

Add command to save current document

Add multi-track editing related commands, including add track, delete empty tracks, etc.

Add multi-track display control related commands, supporting preset track visibility

Add preference-related commands to control applying track visibility to mixer

Add transport control related commands, such as record punches again, etc.

Add view zoom related commands, supporting save and switch zoom presets

Add window control command to open or close track panel
@JKWTCN
Copy link
Author

JKWTCN commented Oct 24, 2025

You can use this ExtendScript to export the object constants of the Application. I noticed that the 2024 version has more commands compared to the 2018 version:

function exportApplicationConstants() {
    var constants = {};
    var app = Application;

    for (var prop in app) {
        if (prop.toUpperCase() === prop && typeof app[prop] !== 'function') {
            constants[prop] = app[prop];
        }
    }

    var filePath = "D:/Temporary/2510/24/ApplicationConstants.txt";
    var file = new File(filePath);

    if (file.open("w")) {
        file.write("Adobe Audition Application Constants\n");
        file.write("Generated on: " + new Date() + "\n\n");

        // Iterate through the constants object directly without sorting
        var count = 0;
        for (var propName in constants) {
            file.write(propName + " = " + constants[propName] + "\n");
            count++;
        }

        file.write("\nTotal constants: " + count);
        file.close();
        $.writeln("success: " + filePath + " (" + count + " constants)");
    } else {
        $.writeln("file could not be opened");
    }

    return constants;
}

exportApplicationConstants();

@JKWTCN
Copy link
Author

JKWTCN commented Oct 24, 2025

Moreover, according to my debugging, I found that the index signature object of AudioClipCollection is AudioClip rather than AudioClipCollection. Wouldn't it be strange if the index signature object of AudioClipCollection were AudioClipCollection itself? You can verify this by running the following ExtendScript:

var activeDoc = app.activeDocument;
if (activeDoc instanceof MultitrackDocument) {
    var select = activeDoc.audioClipSelection;
    if (select instanceof AudioClipSelectionCollection) {
        if (select.length > 0) {
            var clip = select[0];
            if (clip instanceof AudioClip) {
                alert(clip.name);
            }
        }
    }
}

In the end, no error will be thrown. Instead, an alert box will pop up displaying the name of the currently selected AudioClip, which you'll see matches the name of the clip you selected.
image

@JKWTCN
Copy link
Author

JKWTCN commented Oct 25, 2025

Perhaps using ExtendScript Debugging directly would be more intuitive?
image

Added the visible property to the AudioTrack class

Added type declarations and comments for the visible property

Maintained code style consistent with existing properties
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant