Announcement

Collapse
No announcement yet.

Script syntax changed by?? to be wrong!

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

  • Script syntax changed by?? to be wrong!

    I have this syntax in a .vb script:
    hs.Speak ("<volume level = ""100""> <rate absspeed=""-4""> Alexa - <silence msec='300'/> Make An Announcement <silence msec='3500'/> Living Room Window Is Open",True)

    When the script is listed in the Event window, it has been changed to:
    hs.Speak ("<volume level = ""100""> <rate absspeed=""-4""> Alexa - <silence msec='300'></silence> Make An Announcement <silence msec='3500'></silence> Master Bedroom Window Is Open",True)

    When run, I then get an error in HS Speaker log:
    8/18/2019 7:45:18 PM:Error in Speak: Exception from HRESULT: 0x80045042 indicating a syntax error.

    I have edited the script inside the Event window to remove the added text, save the script, and the window immediately reverts the edits back to the incorrect syntax.

    I have put the correct syntax into an event "execute immediate script command" as:
    hs.Speak ("<volume level = ""100""> <rate absspeed=""-4""> Alexa - <silence msec='300'/> Make An Announcement <silence msec='3500'/> Master Bedroom Window Is Open",True)
    and run the event and get in the HS Speaker Log:

    8/18/2019 8:15:02 PM:Speak: <volume level = "100"> <rate absspeed="-4"> Alexa - <silence msec='300'/> Make An Announcement <silence msec='3500'/> Master Bedroom Window Is Open

    and is spoken correctly (i.e. the syntax as originally written is correct)

    How can I keep the syntax from being changed? (What changes it???)

    HomeSeer Version: HS3 Pro Edition 3.0.0.531
    Operating System: Microsoft Windows 7 Home Premium - Work Station

  • #2
    Did you try editing the script outside of the event window?
    -Rupp
    sigpic

    Comment


    • #3
      Yes... actually that's what I did first... editing the script in notepad. When opening it in the event window, the syntax was changed as indicated. Then I tried editing it in the event window.

      Comment


      • #4
        Verified same here.

        HomeSeer Version: HS3 Pro Edition 3.0.0.548
        Operating System: Microsoft Windows Embedded Standard - Work Station

        Same on Firefox & Chrome. The tags are modified as soon as 'Save Script Edits' is pressed.

        Added: same behavior on
        HomeSeer Version: HS3 ZEE S2 Edition 3.0.0.535

        Comment


        • #5
          This bug has been around for several years. I believe I reported it via bugzilla but nothing was done....
          Jon

          Comment


          • #6
            Thanks, Jon, zwolfpack.
            Any workaround suggestions?

            Comment


            • #7
              Thought about having the script pass the pertinent message or index back to an event with if for each condition and hs.speak in execute immediate script but would be cleaner if could keep in the script file...

              Comment


              • #8
                I'd suggest emailing support@homeseer.com
                HS 3.0.0.548: 1976 Devices 1156 Events
                Z-Wave 3.0.1.262: 123 Nodes on one Z-Net

                Comment


                • #9
                  Good suggestion... did just now... but n
                  eed a closer-in workaround... may not be a priority for support...

                  Comment


                  • #10
                    Originally posted by Jayhawk View Post
                    Thanks, Jon, zwolfpack.
                    Any workaround suggestions?
                    It only seems to do it when saved in the script edit window. Try not doing that, instead edit the script in Notepad or other editor.

                    Comment


                    • #11
                      Yes... that seems to work... thought I had tried that before but guess I had always adjusted something and saved.
                      Thanks.

                      Comment


                      • #12
                        For me, editing the scipt outside of the browser is more trouble than it is worth to me.

                        Obviously the problem is the < and > being interpreted as HTML characters/statements.

                        One other way to avoid that would be to specify the string as follows:

                        hs.Speak(Chr(60) + "volume level = ""100""" + Chr(62) + " " + Chr(60) + "rate absspeed=""-4""" + Chr(62) + " Alexa - " + Chr(60) + "silence msec='300'/" + Chr(62) + " Make An Announcement " + Chr(60) "silence msec='3500'/" + Chr(62) + " Living Room Window Is Open",True)


                        Chr(60) returns "<" and Chr(62) returns ">". Using Chr() will "hide" those HTML characters from the browser.

                        Comment

                        Working...
                        X