How can I have homeseer read aloud whatever is in device "d1"?
Announcement
Collapse
No announcement yet.
Device String Question
Collapse
X
-
beachTags: None
-
r = hs.devicestring ("A1")
hs.speak r
-RuppπββοΈ Support & Customer Service πββοΈ Sales Questions π Shop HomeSeer Productsβ
-
beach
Thanks, Rupp. How come that doesn't work with news xml? I tried it, but it still reads all the html. I replaced the given stuff with yahoo sports xml.
Comment
-
jhisr
Or you can skip the variable assignment if you want with:
hs.speak hs.devicestring ("A1")
Joe
HomeSeer Rocks!
Comment
-
The device string can contain HTML as well as text. The above is going to read everything in the device string so if it contains HTML it will be read as well.
-RuppπββοΈ Support & Customer Service πββοΈ Sales Questions π Shop HomeSeer Productsβ
Comment
-
Try this (untested)
r = hs.devicestring ("A1")
position=1 'initialize
while position<>0
position=Instr(r,"<") 'find first html tag
if position<>0 then
position2=Instr(r,">") 'find end of tag
if position2<>0 then
r1=left(r,position-1) & right(r,position2+1) 'get rid of html tag
r=r1
end if
end if
wend
hs.speak r
http://www.midondesign.com
Comment
-
jhisr
I think that logic looks just fine assuming there arenβt any > or < symbols that are part of the message itself. But youβll need to change:
right(r,position2+1
to:
mid(r,position2+1)
Midon Design - Love your avatar. Thatβs exactly how I feel some days.
Joe
HomeSeer Rocks!
Comment
-
beach
Thank you guys. I'll try it tonight. I tried out that xml rss reading script, and added yahoo sports. In the device string it shows up as all text, but i guess it is somehow picking up the hidden html.
Comment
Comment