Skip to Content
It is currently December 5th, 2019, 2:45 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: help with a pal
PostPosted: June 1st, 2014, 9:30 am 
Offline
Junior User
Junior User

Joined: May 31st, 2014, 8:18 am
Posts: 61
can anyone help. this pal stops at var skip??

Code:
// This is the changed head common part
PAL.Loop := True;
VAR skip := false;

// Example item
IF (Now < T['15:00:00'] AND NOT skip) THEN
BEGIN
  Pal.WaitforTime ('XX:00:00'); {## Wait for next hour}
  Cat['toh'].QueueTop(smLRP, NoRules); //load ID to the Top of The Queue
END
ELSE
  skip := true;

//this goes in the very last line
PAL.Loop := NOT skip;


Top
 Profile  
Reply with quote  
 Post subject: Re: help with a pal
PostPosted: June 1st, 2014, 12:11 pm 
Offline
SVS Member
SVS Member

Joined: October 15th, 2003, 11:59 pm
Posts: 4735
Location: Los Angeles - A Little West Of Nashville
You had 2 errors, one in the VAR statement and one in the IF statement.
Code:
VAR skip : boolean = false;

PAL.Loop := True;

// Example item
IF ( (Now < T['15:00:00']) AND (NOT skip) ) THEN
BEGIN
  Pal.WaitforTime ('XX:00:00'); {## Wait for next hour}
  Cat['toh'].QueueTop(smLRP, NoRules); //load ID to the Top of The Queue
END
ELSE
  skip := true;

//this goes in the very last line
PAL.Loop := NOT skip;

_________________
- DJ Dee
- Spacial Volunteer Support (SVS)
- Custom PAL services: www.palscripts.com
- http://www.AlternativeHD.com
- http://www.lahotcountry.com


Top
 Profile  
Reply with quote  
 Post subject: Re: help with a pal
PostPosted: June 2nd, 2014, 8:21 am 
Offline
Junior User
Junior User

Joined: May 31st, 2014, 8:18 am
Posts: 61
can you tell me how to add a day of week to this script. I want it to stop on certain days only


Top
 Profile  
Reply with quote  
 Post subject: Re: help with a pal
PostPosted: June 2nd, 2014, 11:07 am 
Offline
SVS Member
SVS Member

Joined: October 15th, 2003, 11:59 pm
Posts: 4735
Location: Los Angeles - A Little West Of Nashville
Code:
PAL.loop := true;

if ((DayOfWeek(Now) = tuesday)) then
    begin
       // Do Something
    end
else
    begin
      // Do Something Else
    end;

_________________
- DJ Dee
- Spacial Volunteer Support (SVS)
- Custom PAL services: www.palscripts.com
- http://www.AlternativeHD.com
- http://www.lahotcountry.com


Top
 Profile  
Reply with quote  
 Post subject: Re: help with a pal
PostPosted: June 3rd, 2014, 3:38 am 
Offline
Junior User
Junior User

Joined: May 31st, 2014, 8:18 am
Posts: 61
I'm sorry but I do not know how to put these two together can you help


Top
 Profile  
Reply with quote  
 Post subject: Re: help with a pal
PostPosted: June 3rd, 2014, 7:20 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7888
Location: Aachen (Germany)
Just use some basic logic.
You connect the conditions just like the skip and time parts are connected.
Connect using AND so that the body of the condition is only run when all parts of the condition evaluate to true.

_________________
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  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: MSN [Bot] and 11 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:  
Powered by phpBB® Forum Software © phpBB Group