ECS-L 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:
Programming Question
Bill Walters
Sun, 23 Jan 2000 14:34:56 -0600

All -

I'm a little perplexed with a task I want to do.  I'm asking for guideance
or pointers towards a solution.  As I don't typically mess around with
"Files" too much, I haven't got a good handle on ECS's capability for
dealing with them...

Here's what I'm trying to do....

1.  I have created simple batch files to "parse" selected channels from
TV-GUIDE.TXT file into various files, called CHN1.LST, CHN2.LST, etc.
That part works just fine.

2.  I am attempting to build an ACE command, which will use these files, to
re-define various BUTTONS.  The idea is that I can have a button for each
"desired" channel, and have ECS update the captions on these buttons with
the shows currently showing.  Pressing the desired button, will change the
TV or SAT receiver to that channel..   The Caption for HBOP button, for
today is 2 lines, so would look like this:

- 01/23 Sunday    11:30a 135 G5-08  HBOP       John Grisham's The Rainmaker
- 01/23 Sunday    01:45P 135 G5-08  HBOP       Without a Trace

3.  Methodology so far is to define items for the 1st part of the ACE
redefine button command, and the last part of the ACE redefine button
command, and add in the caption thusly:

Items -

ACE Test is True/False
HBO1.LST is File, and file is defined as HBO1.LST
HBO1 Caption is Text item
ACE Btn HBO1 is Text item and holds the 1st part of redefine button API
command
ACE Btn end is Text item and holds the last part of redefine button API
command (the part that goes after the button caption text)



|Event: ACE Movie Buttons  Called ?:No
| If      Ace Text           Is Not True
| Then Event-Exit         Set      True
|
| Do    Character-A      Set     HBO1.LST
| Do    HBO1 Caption  Set     Re-Define Text
|
| WHILE Character-A  Is Not  None
| Do     HBO1 Caption  Set    Character-A
| Do     Character-A      Set    HBO1.LST
| ENDWHILE
|
| Do     HBO1.LST       Set              Rewind
| Do     Ace Text           T1<-T1      ACE Btn HBO1
| Do     Ace Text           T1/A<-T1   HBO1 Caption
| Do     Ace Text           T1/A<-T1   ACE Btn end
| Do     Ace Text           Set              Send->ID:A
| Do     Ace Test           Set              False
| End


THE PROBLEM with all of this is that the WHILE/ENDWHILE statements "choke"
when they get to CR/LF, also, TEXT items (HBO1 Caption) are limited in size;
2 lines "overflows" so think I should be using some sort of "file" item here
too, because the "Ace Text" item will surely exceed the 128 (or whatever)
characters is defined as the maximum....

As if anyone else cares at this point, the "final" command to resize the ACE
button for this particular example would look like:

ACEC:0:BTN:1,5,0,- 01/23 Sunday    11:30a 135 G5-08  HBOP       John
Grisham's The Rainmaker
- 01/23 Sunday    01:45P 135 G5-08  HBOP       Without a Trace,,,,,,,,1





Arraugh.......  where's that "Primer" project I was talking about this time
last year!!!!!!

I need a chapter "for dummies" on re-define text, when used with Files.....

Coments?  Suggestions?  Pointers???

Bill Walters




  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
.