Announcement
Collapse
No announcement yet.
Trying to make simple page but getting 'Expected end of statement' error
Collapse
X
-
Yes. It is definitely enabled. I can use the functions from the event scripts just fine.
-
Do you still have the plugin enabled? It's a bit odd as this for my Current Cost plugin works which is similar to what you are attempting so I can't see why yours does not.
HTML Code:<html> <head> </head> <body> <% response.write "<img src=" & hs.plugin("Current Cost (3P)").grLastDay("", 0, "4575B4", "", "") & ">" %> </body> </html>
Leave a comment:
-
Thank you both for the help. Unfortunately I'm still getting errors using CFGuy's code:
Code:Script error: Object required: 'plug' response.write plug.GetCoolSetPointTemp(1,1)
Leave a comment:
-
I think Blades plugins don't support a single line function call.
Try
Code:plug = hs.plugin("BLStat") response.write plug.GetCoolSetPointTemp(1,1)
Leave a comment:
-
VBScript does get a little funny about stuff with parameters and the use of brackets, how about
Dim CPoint
CPoint = hs.Plugin("BLStat").GetCoolSetPointTemp(1,1)
response.write CPoint
Leave a comment:
-
Thanks for the help. Unfortunately I'm getting this error:
Script error: Object doesn't support this property or method: 'hs.Plugin(...).GetCoolSetPointTemp'
response.write hs.Plugin("BLStat").GetCoolSetPointTemp(1,1)
Leave a comment:
-
in vbscript/asp you do not need to declare in memory the type of the object, indeed I don't think you need to dim it at all in your case (perhaps good practice to do so but not essential). Try;
HTML Code:<%@ Language=VBScript %> <HTML> <head> </head> <BODY> <% response.write hs.Plugin("BLStat").GetCoolSetPointTemp(1,1) %> </BODY > </HTML >
Leave a comment:
-
Trying to make simple page but getting 'Expected end of statement' error
Hey guys. I'm trying to make a simple web page that displays the current cool setpoint on my zwave thermostat.
I'm trying to pull parts from this event script:
tempdownonedegree.vb
Code:Sub Main(ByVal parms as Object) Dim pi As Object Dim oldCoolSetPoint As Double = hs.Plugin("BLStat").GetCoolSetpoint(1,1) Dim currentCoolSetPoint As Double Dim currentTemperature As Double = hs.Plugin("BLStat").GetTemp(1,1) Const failSafe as double = 70 pi = hs.Plugin("BLStat") hs.Plugin("BLStat").DecreaseSetpoint(1,1) currentCoolSetPoint = pi.GetCoolSetpoint(1,1) hs.writelog("Info", "Setpoint changed from " & oldCoolSetPoint & "F to " & currentCoolSetPoint & "F") End Sub
PHP Code:<%@ Language=VBScript %>
<HTML>
<head>
</head>
<BODY>
<%
Dim currentCoolSetPoint As Double = hs.Plugin("BLStat").GetCoolSetPointTemp(1,1)
response.Write currentCoolSetPoint
%>
</BODY >
</HTML >
Script error: Expected end of statement
Dim currentCoolSetPoint As Double = hs.Plugin("BLStat").GetCoolSetPointTemp(1,1)
response.Write currentCoolSetPointLast edited by dinki; March 26, 2012, 02:20 PM.Tags: None
Leave a comment: