I know - I fooled around with the statements. I know I'll be able to get it working - just needs some time
Announcement
Collapse
No announcement yet.
MsgBox() on our web page
Collapse
X
-
jayfro
Jeff,
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)
Comment
-
I realize that I don't yet know asp at all...so 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.
Comment
-
<pre class="ip-ubbcode-code-pre">
<%@ Language=VBScript %>
<HTML>
<HEAD>
</HEAD>
<BODY>
<%
strValue = Request.Form("Value")
strHouseCode = Request.Form("HouseCode")
strUnitCode = Request.Form("UnitCode")
if strValue <> "" and strHouseCode <> "" and strUnitCode <>"" then
hs.SetDeviceValue strHouseCode&strUnitCode,strValue
Response.Write "Device Value of " & strHouseCode&strUnitCode & " = " & hs.DeviceValue (strHouseCode&strUnitCode)
else
Response.Write "Need valid input" & "<br>"
end if
%>
<form name="frmFirst" method="post" action="SetDevice.asp">
HouseCode:<input type="text" size="12" name="HouseCode"><br>
UnitCode: <input type="text" size="12" name="UnitCode"><br>
Value: <input type="text" size="12" name="Value"><br>
<input type="submit">
<form>
<br>
</BODY>
</HTML>
</pre>
-Rupp
{{{{{{{{{{ Remember the reason for the season }}}}}}}}}}
Comment
Comment