okay I have a alias.
conint *
Script: ContactTimerInterval
and the VBS script it calls.
Sub ContactTimerInterval(thename, theoutput, theparameters)
If World.GetVariable("ContactTimer") = "ON" And IsNumeric(Trim(theparameters(1))) = TRUE Then
world.SetVariable "ConTimerInterval", Trim(theparameters(1))
world.note "Contact Timer Interval Set to: " &
World.GetVariable("ConTimerInterval") & " seconds."
World.DeleteTimer "ContactTimer"
World.AddTimer "ContactTimer", 0, 0, Trim(theparameters(1)), "contacts", 1, ""
ElseIf (World.GetVariable("ContactTimer") = "OFF") Then
World.note "You must enable the Contact Timer before setting the interval."
Else
World.note "The current Contact Timer Interval is set to: " & World.GetVariable("ConTimerInterval") & " seconds."
End If
End Sub
I want it to take any Number over 59 and change it to Hours Minutes Seconds, then pass it to the AddTimer function.
So would I do as follows?
then run a While loop that While TRIM(theparameters(1)) is
greater than 60 it does
TRIM(theparameters(1)) - 60 and
World.SetVaraible "ContactIntervalMinutes", +1
or how do you add 1 to a variable?
then after seconds are finished it sets
World.SetVariabliable "ContactIntervalSeconds", TRIM(theparameters(1))
and then finally it checks for hours the same way with a while loop. then uses all that info and sets the Timer.
conint *
Script: ContactTimerInterval
and the VBS script it calls.
Sub ContactTimerInterval(thename, theoutput, theparameters)
If World.GetVariable("ContactTimer") = "ON" And IsNumeric(Trim(theparameters(1))) = TRUE Then
world.SetVariable "ConTimerInterval", Trim(theparameters(1))
world.note "Contact Timer Interval Set to: " &
World.GetVariable("ConTimerInterval") & " seconds."
World.DeleteTimer "ContactTimer"
World.AddTimer "ContactTimer", 0, 0, Trim(theparameters(1)), "contacts", 1, ""
ElseIf (World.GetVariable("ContactTimer") = "OFF") Then
World.note "You must enable the Contact Timer before setting the interval."
Else
World.note "The current Contact Timer Interval is set to: " & World.GetVariable("ConTimerInterval") & " seconds."
End If
End Sub
I want it to take any Number over 59 and change it to Hours Minutes Seconds, then pass it to the AddTimer function.
So would I do as follows?
then run a While loop that While TRIM(theparameters(1)) is
greater than 60 it does
TRIM(theparameters(1)) - 60 and
World.SetVaraible "ContactIntervalMinutes", +1
or how do you add 1 to a variable?
then after seconds are finished it sets
World.SetVariabliable "ContactIntervalSeconds", TRIM(theparameters(1))
and then finally it checks for hours the same way with a while loop. then uses all that info and sets the Timer.