It is making me feel a bit better that you're finding it strange too
tab below:
tab below:
If this is your first visit, be sure to check out the FAQ. You must register before you can post.
IMPORTANT: Your first post will be checked for appropriate content. This may take a bit of time.
Sub Main(parms As Object) Dim tempBOX As Integer Dim speedPCT As Integer Dim myDevCmd As String tempBOX = hs.DeviceValue(45) speedPCT = (tempBOX-25)*10 myDevCmd = "Dim " & speedPCT & "%" hs.WriteLog("BOX Cool Down", " Box Temp: " & tempBOX &"C" & " Fan Percentage: " & speedPCT) CallCAPI(37, myDevCmd) End Sub Function CallCAPI(ByVal intDevRef As Integer, ByVal strDevCmd As String) As CAPIControlResponse CallCAPI = CAPIControlResponse.Indeterminate For Each objCAPIControl As CAPIControl In hs.CAPIGetControl(intDevRef) If LCase(objCAPIControl.Label) = LCase(strDevCmd) Then CallCAPI = hs.CAPIControlHandler(objCAPIControl) Exit For End If Next End Function
Comment