Skip to main content
Skip table of contents

Common Scripting Questions

How do you know when to use parenthesis when calling the scripting functions?

For Older VBScript Scripts, you do not need parenthesis if the procedure is not returning a value:

If the function is returning a value, you need to surround the parameters with parentheses.  Otherwise, you need to omit them.  Here is a function call that does not return a value:

VB
hs.Speak "This is a test"

The following function returns a status value:

VB
Dim MyVal
MyVal = hs.DeviceValue(1234)

For VB.NET Scripts, parenthesis are always used.

VB
hs.Speak("This is a test")

Dim MyVal As Double
MyVal = hs.DeviceValue(1234)

For C# scripts, the format is the same a C#.


Are the function names case-sensitive?

Not for VBScript or VB.Net scripts.  The function hs.Speak("Test") and hs.speAK("Test") are identical and work the same way. For C# scripts, they are case sensitive.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.