Skip to Content
It is currently November 21st, 2019, 2:47 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: April 3rd, 2019, 4:19 am 
Offline
New User
New User

Joined: April 3rd, 2019, 4:14 am
Posts: 2
Hi there.

I'm wondering is it possible somehow to make a script do something specific upon a specific track title?

My idea is basically:

Run every 20 minutes.
Check if ActivePlayer current song has [LIVE] in title - If true restart script. - If false ->
Queue.AddFile('SomeSweeper.mp3',ipTop);
PAL.Loop := True;

Would this be possible? If so, could someone shed some light on it?

Thanks! :-)


Top
 Profile  
Reply with quote  
PostPosted: April 3rd, 2019, 12:54 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7882
Location: Aachen (Germany)
Code:
PAL.Loop :=True;
PAL.WaitForTime('+00:20:00');
VAR S : TSongInfo;
S := ActivePlayer.GetSongInfo;
IF S <> NIL THEN
BEGIN
  IF Pos('[LIVE]',S['title']) = 0 THEN
  BEGIN
    Queue.AddFile('SomeSweeper.mp3',ipTop);
  END
END;

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: April 4th, 2019, 2:32 pm 
Offline
New User
New User

Joined: April 3rd, 2019, 4:14 am
Posts: 2
Thanks a bunch!
- I have just tested it and it works like a dream.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group