Announcement

Collapse
No announcement yet.

Device String Question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Device String Question

    How can I have homeseer read aloud whatever is in device "d1"?

    #2
    r = hs.devicestring ("A1")
    hs.speak r
    -Rupp
    -Rupp
    sigpic

    Comment


      #3
      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


        #4
        Or you can skip the variable assignment if you want with:

        hs.speak hs.devicestring ("A1")

        Joe
        HomeSeer Rocks!

        Comment


          #5
          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
          -Rupp
          sigpic

          Comment


            #6
            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
            http://www.midondesign.com

            Comment


              #7
              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


                #8
                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

                Working...
                X