LoadNextHour script (2)

Hello,

I’m using some scripts with an older version of mAirList (2.1). From the last two versions the script doesn’t work anymore and I understand that this has something to do with that “IFactory interface” stuff but I can’t get it to work, and I don’t understand how to fix this. Could someone please help?

Script 1 (load currentHour)

begin CurrentPlaylist.LoadFromFile('D:\jingles_radio\Sterrenwacht\radio\playlist\' + FormatDateTime('ddd dd mmm hh', now) + '.m3u', false); end.

Script 2 (load nextHour)

begin CurrentPlaylist.LoadFromFile('D:\jingles_radio\Sterrenwacht\radio\playlist\' + FormatDateTime('ddd dd mmm hh', now + 0.04166) + '.m3u', false); end.

Script 3 Playlist empty

[code]procedure OnPlaylistEmpty(PlaybackControl: IPlaybackControl; Playlist: IPlaylist);
begin
Playlist.LoadFromFile(‘D:\jingles_radio\Sterrenwacht\radio\ramp.m3u’, true);
end;

begin
end.[/code]

With all of these 3 scripts I get the same error:

[error] invalid number of parameters

For the rest: my compliments for the LayoutDesigner!!

Regards,
Vincent Volmer

Hi,

It looks like the parameters of “LoadFromFile” has changed with one of the last versions. Now its only

procedure LoadFromFile ( iFilename : string ) 

That means, that you have to omit the boolean statement in the end.

It must look like this:

  CurrentPlaylist.LoadFromFile('D:\jingles_radio\Sterrenwacht\radio\playlist\' + FormatDateTime('ddd dd mmm hh', now) + '.m3u');

(untestet)
greetings, michi

[quote=“flashlighter, post:2, topic:4573”]Hi,

It looks like the parameters of “LoadFromFile” has changed with one of the last versions. Now its only

procedure LoadFromFile ( iFilename : string ) 

That means, that you have to omit the boolean statement in the end.

(untestet)
greetings, michi[/quote]

I removed Script 1 , false and Script 2, false and Script 3, true at the end of the scripts and now they are working again! Thank you so much~!

Regards Vincent