[solved] OnStartup & OnShutdown ohne funktion? (3.0.0 Build 529)

Hallo Torben,

bin nach wie vor dabei an Firmware und passendem Script für mein Mixercontrol zu feilen und wollte es beim Start initialisieren und beim Beenden zurücksetzen. Leider tut sich bei oben genannten Events rein garnichts.

[code]function FindPlayer(iPlayer: IPlayerControl; var playlist, player: integer): boolean;
begin
for playlist := 0 to PlaylistCount - 1 do
for player := 0 to PlaybackControl(playlist).GetPlayerCount - 1 do
if PlaybackControl(playlist).GetPlayer(player).GetCaption = iPlayer.GetCaption then begin
Result := true;
exit;
end;
Result := false;
end;

procedure OnStartup;
begin
ComPort(2).SendStr(‘RESET’ + #13#10);
end;

procedure OnShutdown;
begin
ComPort(2).SendStr(‘ALL 0’ + #13#10);
end;

procedure OnPlayerStart(PlayerControl: IPlayerControl; Item: IPlaylistItem);
var
player, playlist: integer;
pl: IPlayerControl;
begin
if FindPlayer(PlayerControl, playlist, player) then
ComPort(2).SendStr(‘PORT ’ + IntToStr(player+3) + ’ 2’ + #13#10);
end;

procedure OnPlayerStop(PlayerControl: IPlayerControl; Item: IPlaylistItem; Duration: int64);
var
player, playlist: integer;
pl: IPlayerControl;
begin
if FindPlayer(PlayerControl, playlist, player) then
ComPort(2).SendStr(‘PORT ’ + IntToStr(player+3) + ’ 0’+#13#10);
end;

begin
end.[/code]

Falls du meine Frage im allgemeinen Forum übersehen haben solltest, hier auch die nochmal: Gibt es Events beim Laden/Entladen des Players?

Gruß
Dominique Görsch

Mit Build 551 beheoben. Danke.
http://forum.mairlist.com/index.php/topic,3705.msg25769.html#msg25769