IPlaylistItem "action at stop"

Hi,

how can I add an “action at start” and “action at stop” to a track in a script? Is there a function like “pi.stopaction”?

[code]procedure OnExecuteCommand(Command: string);
var
pi: IPlaylistItem;
begin
if copy(command, 1, 11) = 'INSERTFILE ’ then begin
pi := Factory.CreatePlaylistItemFromFile(copy(command, 12, 255), [fitAutoCue]);

  pi.stopaction(fade out Cartwalls)?

CurrentPlaylist.Insert(CurrentPlaylist.GetNextIndex, pi);

end;
end;

begin
end.[/code]

pl.GetStartActions and pl.GetStopActions will return the respective IActionList object where you can add actions.

It’s just not so easy to create action instances at runtime.

If it’s more or less the same action list, I would just prepare them somewhere in the GUI (e.g. in the Event Editor), save the action list as .mla file, and then load it:

pi.GetStopActions.LoadFromFile('c:\fadeoutcartwall.mla');

Thx :slight_smile: