ECS Home Automation and Security Archives
  learn more | view messages for this month | NetBloc® | terms of use | search

Google
 


  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects

Subject:
From:
Date:
corrected TVL Script attached
Mark Gilmore
Mon, 05 May 2003 18:27:42 -0700
Mon, 05 May 2003 18:27:42 -0700


Mark Gilmore
http://OmnipotenceSoftware.com 


Name:			TVL
Class:			Script
Control:		Enabled
Called:			No
Begin:

;************************************************
; Download listings Sunday at 2AM if enabled
;------------------------------------------------
If  TVL_BAT-Enabled  Is  True
	{
	If  TVL_BAT-Enabled  Is Now  True
	Or  Clock.Weekday  Is  Sunday
	And  Clock.Time  Is Now  2:00 AM
	Then  TVL_BAT.Control  Set  Execute
	}

;************************************************
; Stop recording when applicable
;------------------------------------------------
If  TVL-Record-Timer  Is Now  0
;??Then  VCR:Stop  Set  Send

;************************************************
; Generate TVL.HTM when requested
;------------------------------------------------
If  Update  Is  URL
	{
	If  URL  Is  "TVL.HTM"	; default start time  (now) ?
	Then  TVL4  Set  "START /MIN /w TVL4 now 720 TVL.HTM"
	Then  TVL4.Control  Set  Execute
	Else
		{
		Do  Text-A  Set  URL
		Do  Text-A.Substring  Set  "TVL.HTM?}~"
		If  Text-A.Substring  Is Not  ""	; specific start-time ?
		Then  TVL4  Set  "START /MIN /w TVL4 ""
		Then  TVL4  Add  Text-A.Substring
		Then  TVL4  Add  "" 720 TVL.HTM"
		Then  TVL4.Control  Set  Execute
		}
	}

;************************************************
; Gen fav list every 5 mins:
;------------------------------------------------
If  Clock.Minute  Is Now  4
Or  Clock.Minute  Is Now  9
Or  Clock.Minute  Is Now  14
Or  Clock.Minute  Is Now  19
Or  Clock.Minute  Is Now  24
Or  Clock.Minute  Is Now  29
Or  Clock.Minute  Is Now  34
Or  Clock.Minute  Is Now  39
Or  Clock.Minute  Is Now  44
Or  Clock.Minute  Is Now  49
Or  Clock.Minute  Is Now  54
Or  Clock.Minute  Is Now  59
	{
	Do  TVL3_TMP.Control  Set  Delete
	Do  TVL3.Control  Set  Execute
	;************************************************
	; Process favs
	;------------------------------------------------
	Do  TVL3_TMP.Read  Set  Next
	While  TVL3_TMP.Read  Is Not  None
	And  TVL3_TMP.Read  Is Not  EOF
	And  TVL3_TMP.Read  Is Not  ERROR
		{
		Do  Text-A  Set  TVL3_TMP.Read
		;************************************************
		; Parse code/show/chan/etc
		;------------------------------------------------
		; Clear all
		;-------------------------------------------------
		Do  TVL-Code  Set  <NUL>
		Do  TVL-Minutes  Set  0
		Do  TVL-Chan  Set  ""
		Do  TVL-Show  Set  ""
		Do  TVL-Description  Set  ""
		;------------------------------------------------
		; Parse TVL record
		;------------------------------------------------
		Do  Text-A.Index  Set  0
		If  Text-A.Index  Is  None
		Then  Return

		Do  TVL-Code  Set  Text-A.Index

		; Show length (in minutes):
		Do  Text-A.Substring  Set  25:28
		Do  TVL-Minutes  Set  Text-A.Substring

		; Chan#:
		Do  Index-2  Set  45
		Do  Index  Set  29
		While  Index  <=  45	; Find last non-space index
			{
			Do  Text-A.Index  Set  Index
			If  Text-A.Index  Is Not  <Space>
			Then  Index-2  Set  Index
			Do  Index  Add  1
			}
		Do  Index-2  Add  1
		Do  Text-B  Set  "29:"
		Do  Text-B  Add  Index-2
		Do  Text-A.Substring  Set  Text-B
		Do  TVL-Chan  Set  Text-A.Substring

		; Show name:
		Do  Index-2  Set  126
		Do  Index  Set  47
		While  Index  <=  126	; Find last non-space index
			{
			Do  Text-A.Index  Set  Index
			If  Text-A.Index  Is Not  <Space>
			Then  Index-2  Set  Index
			Do  Index  Add  1
			}
		Do  Index-2  Add  1
		Do  Text-B  Set  "47:"
		Do  Text-B  Add  Index-2
		Do  Text-A.Substring  Set  Text-B
		Do  TVL-Show  Set  Text-A.Substring

		; Show description:
		Do  Text-A.Substring  Set  128:
		Do  TVL-Description  Set  Text-A.Substring
		;------------------------------------------------

		If  TVL-Code  Is  a
		Or  TVL-Code  Is  A
		Or  TVL-Code  Is  v
		Or  TVL-Code  Is  V
		Or  TVL-Code  Is  r
		Or  TVL-Code  Is  R
			{
			If  Awake  Is  True
			Then  Sound-Card.Speak  Set  TVL-Show
			Then  Sound-Card.Speak  Set  TVL-Show
			If  TVL-Code  Is  v
			Or  TVL-Code  Is  V
				{
				Do  Sound-Card.Speak  Set  "Viewing"
				Do  TV-Chan  Set  TVL-Chan
				}
			Else If  TVL-Code  Is  r
			Or  TVL-Code  Is  R
				{
				Do  Sound-Card.Speak  Set  "Recording"
				Do  TV-Chan  Set  TVL-Chan
				If  TVL-Code  Is  r
				Or  TVL-Code  Is  R
					{
					;??Do  VCR:Stop  Set  Send
					;??Do  VCR:Rec  Set  Send
					Do  TVL-Record-Timer  Set  TVL-Minutes
					}
				}
			}
		Do  TVL3_TMP.Read  Set  Next
		}
	}




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.476 / Virus Database: 273 - Release Date: 4/24/2003


  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects




Services provided by [NetBloc]®! NetBloc Solutions Inc.
Terms of use. Indexing software (c) 1999 Lin-De, Inc
.