Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;*** Orignal downloaded from: http://www.hawkee.com/snippet/7667/ ( Written by: http://www.hawkee.com/profile/39642/ )
- alias -l setautofiles {
- if $isfile(AutoTimeToday.txt) { var %x 1 | while ($read(AutoTimeToday.txt,%x)) { $+(.timer,$v1) off | inc %x } }
- if $isfile(AutoTimeToday.txt) { echo 4 -a * Auto 10-Minute-Prior TV Show Announcer Has Been Turned On!
- var %x 1 | while ($read(AutoTimeToday.txt,%x)) { $+(.timer,$v1) $v1 1 1 .play $+(-t,$v1) # AutoShowToday.txt | inc %x }
- }
- }
- ;**********************************************************************************************************************************
- on *:sockopen:tvqauto:{
- var %tvqauto sockwrite -n tvqauto
- %tvqauto GET /tools/quickschedule.php HTTP/1.1
- %tvqauto Host: services.tvrage.com
- %tvqauto $crlf
- }
- ;**********************************************************************************************************************************
- on *:sockread:tvqauto:{ var %tvqinfoauto | sockread %tvqinfoauto
- ;**********************************************************************************************************************************
- if $regex(%tvqinfoauto,/\[TIME\](.*)\[\/TIME\]/i) { set -u7 %sTiME $asctime($ctime($date $regml(1)),HH:nn)
- var %time $asctime($calc($ctime($date $regml(1)) - 600),HH:nn)
- write AutoShowToday.txt $+([,%time,])
- write AutoShowToday.txt 5Airing in the next 10 minutes ->
- write AutoTimeToday.txt %time
- }
- ;**********************************************************************************************************************************
- elseif $regex(%tvqinfoauto,/\[SHOW\](.*)\[\/SHOW\]/i) {
- ;**********************************************************************************************************************************
- set -u3 %tvqinfoauto_NetW $remove($mid(%tvqinfoauto,$pos(%tvqinfoauto,]),$calc($pos(%tvqinfoauto,^,1) -$pos(%tvqinfoauto,],1))),])
- set -u3 %tvqinfoauto_TiTLE $remove($mid(%tvqinfoauto,$pos(%tvqinfoauto,^,1),$calc($pos(%tvqinfoauto,^,2) -$pos(%tvqinfoauto,^,1))),^)
- set -u3 %tvqinfoauto_EP $remove($mid(%tvqinfoauto,$pos(%tvqinfoauto,^,2),$calc($pos(%tvqinfoauto,^,3) -$pos(%tvqinfoauto,^,2))),^)
- set -u3 %tvqinfoauto_LiNK $remove($mid(%tvqinfoauto,$pos(%tvqinfoauto,^,3),$calc($pos(%tvqinfoauto,[,2) -$pos(%tvqinfoauto,^,3))),^)
- ;**********************************************************************************************************************************
- ;*** Output / How it spits out the iNFO
- set -u3 %tvqinfoauto_SHOW $iif(%sTiME,$+(4,[14,$v1,4])) $+(15,%tvqinfoauto_TiTLE,) 14-4#14- $+(14,$replace(%tvqinfoauto_EP,x,15x14),) 14-4#14- $+(8,%tvqinfoauto_NetW,) $+(,$chr(40),2,%tvqinfoauto_LiNK,,$chr(41),)
- ;**********************************************************************************************************************************
- write AutoShowToday.txt %tvqinfoauto_SHOW
- }
- ;**********************************************************************************************************************************
- elseif $regex(%tvqinfoauto,/\[DAY\](.*)\[\/DAY\]/i) { write AutoShowToday.txt $regml(1)
- write $+(-d,$lines(AutoShowToday.txt)) AutoShowToday.txt
- if (($date(dd) = 30 && $chr(44) 31 !isin %xauto)) { set %xauto , 01 }
- $iif(%xauto isin %tvqinfoauto,sockclose tvqauto)
- }
- ;**********************************************************************************************************************************
- }
- menu * {
- -
- Enable Auto Announcer {
- $iif($isfile(AutoTimeToday.txt),write -c AutoTimeToday.txt)
- $iif($isfile(AutoShowToday.txt),write -c AutoShowToday.txt)
- sock $+ $iif($sock(tvqauto),close,open) tvqauto services.tvrage.com 80
- if ($date(dd) = 31) set -u5 %xauto , 01
- else {
- set -u5 %xauto $right($date(dd),1)
- set -u5 %xauto $+($left($date(mm),1),$calc(%xauto +1))
- .timerxauto 1 1 setautofiles
- }
- }
- Disable Auto Announcer {
- if $isfile(AutoTimeToday.txt) { echo 4 -a * Auto Announcer Has Been Switched Off!
- var %x 1 | while ($read(AutoTimeToday.txt,%x)) { $+(.timer,$v1) off | inc %x }
- $iif($isfile(AutoShowToday.txt),.remove AutoShowToday.txt)
- $iif($isfile(AutoTimeToday.txt),.remove AutoTimeToday.txt)
- }
- }
- -
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement