Program Start/End time macros

You have a question or need an advice about how to do something? Ask it here!
User avatar
Quentin D
Posts: 89
Joined: 20 Aug 2015 13:18
Program Start/End time macros

Post by Quentin D »

Hello,
I would like to write the program start/end and the program name into a file. Something like : 11:00-12:00 Program Name
I'm trying to do that using the global Event/Commands > Scheduler > OnScriptStarted

Code: Select all

c:\currentshow.txt|nd|${HH}:${mm} - ${progcurrentname}
I get the start time using {HH}:${mm} but I miss the program end time, is there a way to get it ?
Thanks
User avatar
radio42
Site Admin
Posts: 8328
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Program Start/End time macros

Post by radio42 »

You can use the ${start_...} resp. the ${end_...} macros:

${start} : the program start date and time in format ‘yyyy-MM-dd HH:mm:ss’
${end} : the program end date and time in format ‘yyyy-MM-dd HH:mm:ss’
${start_yyyy} : the program start year 4-digits (0000-9999)
${start_yy} : the program start year 2-digits (00-99)
${start_MM} : the program start month 2-digits (00-12)
${start_dd} : the program start day 2-digits (00-31)
${start_dow} : the program start day of the week (1=Monday…7=Sunday)
${start_week} : the program start Iso8601 week number 2-digits (00-53)
${start_HH} : the program start hour 2-digits (00-23)
${start_mm} : the program start minute 2-digits (00-59)
${start_ss} : the program start second 2-digits (00-59)
${end_yyyy} : the program end year 4-digits (0000-9999)
${end_yy} : the program end year 2-digits (00-99)
${end_MM} : the program end month 2-digits (00-12)
${end_dow} : the program end day of the week (1=Monday…7=Sunday)
${end_week} : the program end Iso8601 week number 2-digits (00-53)
${end_dd} : the program st end art day 2-digits (00-31)
${end_HH} : the program end hour 2-digits (00-23)
${end_mm} : the program end minute 2-digits (00-59)
${end_ss} : the program end second 2-digits (00-59)
User avatar
Quentin D
Posts: 89
Joined: 20 Aug 2015 13:18
Re: Program Start/End time macros

Post by Quentin D »

I tried ${start_HH} and ${end_HH} but i doesn't work. Or maybe I placed the command in the wrong place?
User avatar
radio42
Site Admin
Posts: 8328
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Program Start/End time macros

Post by radio42 »

I also tested it here with this command in the global Scheduler.OnScriptStarted event:
SHOW_ALERT_WINDOW Script: Start = ${start_HH}:${start_MM} - End = ${end}

I then clicked on 'Run Scheduler' ... and the alert was displayed correctly!
"Script: Start = 15:15 - End = 2015-10-22 16:15:00"
User avatar
Quentin D
Posts: 89
Joined: 20 Aug 2015 13:18
Re: Program Start/End time macros

Post by Quentin D »

Ok, i've reproduced what you've done and it works. I was using the "Test" button, and it seems some macros doesn't work in that way!
User avatar
radio42
Site Admin
Posts: 8328
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Program Start/End time macros

Post by radio42 »

Yes, as the test button can not emulate a running script.
It can only test the very basic global macros.
User avatar
Quentin D
Posts: 89
Joined: 20 Aug 2015 13:18
Re: Program Start/End time macros

Post by Quentin D »

I've set the command to :

Code: Select all

${start_HH}:${start_mm}-${end_HH}:${end_mm} - ${progcurrentname}
It should works, except for the ${end_HH}, I get the same result as ${start_HH}.
User avatar
Quentin D
Posts: 89
Joined: 20 Aug 2015 13:18
Re: Program Start/End time macros

Post by Quentin D »

Ok, thank you, you can mark this thread as solved ;)
User avatar
radio42
Site Admin
Posts: 8328
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Program Start/End time macros

Post by radio42 »

Ohh yes, that's indeed a small bug in that ${end_HH} macros - looks like a copy & paste issue ;-)
It'll be fixed with the next version...
User avatar
radio42
Site Admin
Posts: 8328
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Program Start/End time macros

Post by radio42 »

The ${end_HH} macro is now corrected in the latest v4.0.0.24!

Post Reply