Load audio on startup script?

Hi there.

I wanted audio to load into the playlist/player on startup…e.g. an opener…so every time mAirList is opened, it will load this audio.

I was thinking this, but it didn’t work :\

procedure OnStartup;
begin
CurrentPlaylist.LoadFromFile(‘C:\Users\Ryan\Documents\RADIO\IDENTS\Generic\Final_Cuts\GENERIC_OPENER_DRY_END.mp3’);
end;
begin
end.

Thanks, Ryan.

Easiest solution: Set up playlist, cartwall and browsers as needed and save the desktop to “standard.mlt” (note the extension) in your mAirList folder.

This file is opened every time mAirList starts.

Hi Torben, just beat me to it.

Kind regards tony

Ah yes i remember doing this in the past…i never knew it saved audio in the lineup too!

Thanks Torben and Tony. Ryan.

Oh, and by the way: The script you posted failes because LoadFromFile is for loading a playlist (mlp or m3u) but not for inserting a file into the playlist. The latter involves using Factory.CreatePlaylistItemFromFile. But you just got around it :wink:

haha. I thought it was due to the fact it wasn’t ‘playlist’ attribute…so i posted here to see if anyone could solve that and change the attribute haha.

Thanks, Ryan!