Announcement

Collapse
No announcement yet.

Convert legacy HS2 script to HS4

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • John245
    replied
    Originally posted by John245 View Post
    I have the following legacy HS2 script that I want to convert to HS4:

    sub main()
    hs.SendToComPort 15,"I + 1"+vbcr
    end sub

    How will this work in HS4? Do I need to add ".vb" as extension to the script file?

    I'm getting this Error:
    Running script: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: startIndex-> at System.String.IndexOf(String value, Int32 startIndex, Int32 count, StringComparison comparisonType) at System.String.IndexOf(String value, Int32 startIndex) at Scheduler.Trigger.TriggerRunScript(String scr, Boolean single_instance, Int32 phone_line, String host, Boolean wait_here, String CalledFrom, String UName, Int32 URights, String passedfunc, Object passedparam, Int32 evref, Boolean DoSetEvent)

    ---
    John
    Solved. Will go the Node-RED path.

    ---
    John

    Leave a comment:


  • John245
    started a topic Convert legacy HS2 script to HS4

    Convert legacy HS2 script to HS4

    I have the following legacy HS2 script that I want to convert to HS4:

    sub main()
    hs.SendToComPort 15,"I + 1"+vbcr
    end sub

    How will this work in HS4? Do I need to add ".vb" as extension to the script file?

    I'm getting this Error:
    Running script: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: startIndex-> at System.String.IndexOf(String value, Int32 startIndex, Int32 count, StringComparison comparisonType) at System.String.IndexOf(String value, Int32 startIndex) at Scheduler.Trigger.TriggerRunScript(String scr, Boolean single_instance, Int32 phone_line, String host, Boolean wait_here, String CalledFrom, String UName, Int32 URights, String passedfunc, Object passedparam, Int32 evref, Boolean DoSetEvent)

    ---
    John
Working...
X