I have a very little problem that is freaking me out... I'm writing a simple pal script in which i control the artist of the currently playing song.
If it is NOT equal to a particular artist, then the program should execute the if block (in which there is a waiting for a certain time), otherwise the execution should be paused waiting for the change of the artist.
What I obtain here is that the control of the current time is bypassed and the if block is repeated as a loop.
PAL.loop := true;
var next, Song, liner,Jingle : TSongInfo;
var Aux : Tplayer;
var MyTime : DateTime;
Song := ActivePlayer.GetSongInfo;
Artista := Song['artist'];
if Artista <> 'DIRETTA' then //I control if the Artist is different from "DIRETTA"
PAL.WaitForTime('XX:59:35'); // wait the hour
[DO OTHER THINGS...]