No announcement yet.

MsgBox() on our web page

  • Filter
  • Time
  • Show
Clear All
new posts

    I know - I fooled around with the statements. I know I'll be able to get it working - just needs some time



      Here is what I am doing currently, although it will need to be modified for your purpose, I think it does what you want.

      I have a form on my website that allows the entry of this data. I then pass the data via a URL get to the HS server with the proper URL parameters. In my case I am speaking the values, but you should be able to change the hs.speak to hs.whatever command you want with the values.

      ' This script will take a URL parameter called "speak" and "visitor"
      ' the text over the house speakers. It can be called from anywhere.
      ' URL format: http://#homeip#:8000/speak.asp?speak=#value to speak#&visitor=#visitor name#
      ' Written 9/22/03 by Jay

      <%@ Language=VBScript %>


      if hs.isonbyname ("House Remote Speakers") then 'Virtual Setting so I can disable remote speakers
      if hs.isoffbyname ("Living Room Speakers") then 'Dont do it if Virtual setting is not enabled
      hs.Writelog "Remote Speakers", "Turning on Remote Speakers" 'Log it
      hs.execx10byname "Living Room Speakers","on",0 'Turn on Remote Speakers
      end if
      end if
      hs.waitsecs 2 'Wait secs before speaking to give time for speakers to turn on
      ' hs.speak "f:\winnt\media\notify.wav", true 'Play sound before speaking to make it pretty
      hs.speak " website visitor ", TRUE
      hs.speak Request.QueryString("visitor"), TRUE 'speak the visitor field value
      hs.speak " has entered the following message on our website.", TRUE
      hs.speak Request.QueryString("speak"), TRUE 'Speak the needed text that was passed in the speak field
      hs.Writelog "Remote Speakers","Turning off Remote Speakers"
      hs.execx10byname "Living Room Speakers","off",0 'Turn off the speakers


      Jay Fro

      (Current Setup in Profile)


        I realize that I don't yet know asp at I would appreciate some help.

        Rupp, I tried to get your asp code going and it works great - enabling me to change the status of a device.

        How can I get it to take 2 inputs? I want to enter both the House/Unit code and the new value?

        I have tried to monkey around with the code but can't get it.


          <pre class="ip-ubbcode-code-pre">
          &lt;%@ Language=VBScript %&gt;
          strValue = Request.Form("Value")
          strHouseCode = Request.Form("HouseCode")
          strUnitCode = Request.Form("UnitCode")

          if strValue &lt;&gt; "" and strHouseCode &lt;&gt; "" and strUnitCode &lt;&gt;"" then
          hs.SetDeviceValue strHouseCode&strUnitCode,strValue
          Response.Write "Device Value of " & strHouseCode&strUnitCode & " = " & hs.DeviceValue (strHouseCode&strUnitCode)
          Response.Write "Need valid input" & "&lt;br&gt;"
          end if
          &lt;form name="frmFirst" method="post" action="SetDevice.asp"&gt;
          HouseCode:&lt;input type="text" size="12" name="HouseCode"&gt;&lt;br&gt;
          UnitCode: &lt;input type="text" size="12" name="UnitCode"&gt;&lt;br&gt;
          Value: &lt;input type="text" size="12" name="Value"&gt;&lt;br&gt;
          &lt;input type="submit"&gt;




          {{{{{{{{{{ Remember the reason for the season }}}}}}}}}}


            thanks Greg, that did it for me. Now I understand it - now that I see the code.

            I have a good html book and have crawled my way through it - guess I have to do the same with asp.!