|
ECS-L Home Automation and Security Archives |
learn more
| view messages for this
month | NetBloc® | terms of use | search
subject (prev) or (next) |
time (prev) or (next) |
author (prev) or (next) |
view more subjects
Subject: From: Date: | RE: [ECS] Reading a text file into a number A.J. Griglak Sat, 4 Mar 2000 11:59:47 -0500 |
Thanks for your reply, Scott.
Hmmm.... I think we're getting there, but there is still something wrong.
I'm not sure what the sixth line's operator should be. T1/A<-Stt ?? Also,
cur_temp# is of type Number, and input_string is of type text - Apparently
you can't transfer text to a number.
Maybe it would be easier if I just get the SECU-16I and the temperature
sensor and do it the right way ;-)
-=A.J.
-----Original Message-----
From: Scott Danks [mailto:sdanks@ci.tulsa.ok.us]
Sent: Friday, March 03, 2000 5:10 PM
To: ecs-list@netbloc.com
Subject: Re: [ECS] Reading a text file into a number
Hi AJ..
I am still testing my event that gets a specific wav to play if someone
calls in. I will post it as soon as I'm sure it's working, but in the
testing part, it looks to be working pretty good. I'm at work, so I will
have to try and remember what I do, here is my suggestion.
define the input_char as type character
define the cur_temp as type file pointing to cur_temp.txt
define input_string as type text
do input_string set re-define text
while input_char is not none
do input_char set cur_temp
if input_char is GE 0
and input_char is LE 9
then input_string t1/a<- input_char
endwhile
do cur_temp# t1<-t1 input_string
This is probably not the best way to do it, but it works for me when I code
this way. I will have to look at the set/char function.
Scott Danks
>>> "A.J. Griglak" <aj@griglak.com> 03/03 12:06 AM >>>
Can someone please explain how to read a text file into a Number Item in
ECS???
I have been looking at the TVL Parse event that's in Example.CFG and for the
life of me can't figure it out!!!
I have a text file called cur_temp.txt that holds the current temperature,
parsed from weather.com. It looks like this:
36degrees
I would like to have an Item in ECS that is of type number that I can do
something like
If cur_temp# IS LT 32
Then msg:It's Cold Set Speak
I just don't get the Set/Char operator and all the
Do Character-A Set/Char Text-A
lines...
Also, where in the Event TVL Parse is the actual filename of the text file??
Clueless,
-=A.J.
subject (prev) or (next) |
time (prev) or (next) |
author (prev) or (next) |
view more subjects