I am running the following script
<php>
Sub Main(ByVal parm As Object)
Dim strResults As String = ""
' Turn output 011 On
strResults = hs.plugin("UltraM1G").ControlOutput("011", "Off", "0")
If strResults.Length > 0 Then
Call hs.WriteLog("Error", strResults)
End If
' Get output state
Dim Output As Hashtable = hs.plugin("UltraM1G").GetOutputState("011")
If Output Is Nothing Then
' Unable to get output state
Else
' Do cool stuff with these results
Dim strOutputName = Output("Name")
Dim strOutputStatus = Output("Status")
Dim strOutputLastChange = Output("LastChange")
hs.WriteLog ("ULTRA TEST", "Name " & strOutputName & "-Status " & strOutputStatus & "-LastChange " & strOutputLastChange)
End If
End Sub
</php>
But I get the following error in my log.
7/8/2008 1:55:48 AM Error Script compile error: Type 'Hashtable' is not defined.on line 24
<php>
Sub Main(ByVal parm As Object)
Dim strResults As String = ""
' Turn output 011 On
strResults = hs.plugin("UltraM1G").ControlOutput("011", "Off", "0")
If strResults.Length > 0 Then
Call hs.WriteLog("Error", strResults)
End If
' Get output state
Dim Output As Hashtable = hs.plugin("UltraM1G").GetOutputState("011")
If Output Is Nothing Then
' Unable to get output state
Else
' Do cool stuff with these results
Dim strOutputName = Output("Name")
Dim strOutputStatus = Output("Status")
Dim strOutputLastChange = Output("LastChange")
hs.WriteLog ("ULTRA TEST", "Name " & strOutputName & "-Status " & strOutputStatus & "-LastChange " & strOutputLastChange)
End If
End Sub
</php>
But I get the following error in my log.
7/8/2008 1:55:48 AM Error Script compile error: Type 'Hashtable' is not defined.on line 24
Comment