The goal of the script is to look for an intro for the artist in the top of the Queue. It works fine until is plays someone who doesn't have an intros, then it stops working. Anyone have any ideas what I'm doing wrong? If someone has a better idea I'm open.
//The Purpose for this script is to load an intro for a song
//Categories for each artist are created with name "artist" + ' VO'
//The script is supposed to look at the next artist in the Queue,
// look for a category ex: "Alan Jackson OV" select the least played
// intro and load it in front of the song.
//All the intros have"I-" as the first 2 characters.
//The script checks to see if the current track playing has a "-" for the
// second character. If it does then it should skip attempting to load intro
var NxSong : TSongInfo;
var Announcement : TSongInfo;
var Player1 : TSongInfo;
var Player2 : TSongInfo;
var GetChar1 : String = '=';
var GetChar2 : String = '=';
var IsDash : String = 'N';
Pal.Loop := True;
//Check what tracks are loaded into the players
Player1 := DeckA.GetSongInfo;
Player2 := DeckB.GetSongInfo;
//See what the second character in the track is. Checking for "-"
GetChar1 := CharAt(Player1['Artist'], 2);
GetChar2 := CharAt(Player2['Artist'], 2);
//Set Y or N for detection of "-"
If GetChar1 = '-' Then
IsDash := 'Y'
If GetChar2 = '-' Then
IsDash := 'Y'
//If there is not a dash then execute process of loading intro track
If IsDash = 'N' Then
NxSong := Queue.NextInQueue;
Announcement := CAT[((NxSong['Artist'])+' VO')].ChooseSong(smLRP,NoRules);