My VB experience to date has been largely limited to Excel macros. I am used to being able to define variable types, e.g.
Dim n As Integer
Dim s As String
Function MyFunc(Arg1 as String, Arg2 as Integer)
This does not appear to be supported in Opus @script vbscript code.
I can get round the issue by using conversion functions such as CInt(n) when necessary but would prefer not to have to. Is there a way of "typing" variables in Opus @script vbscript routines?
VBScript and VB or VBA have a few differences, and that's one of them.
All variables in VBScript are variants; you can't restrict them to any particular type. Just use "Dim i" instead of "Dim i As Integer".
(This isn't specific to Opus. The VBScript interpreter is part of Windows.)
Another problem with VBScript compared to VB/VBA is it has abysmal error handling. Your options are the script exiting on error or the script ignoring errors completely (on error resume next). The VB/VBA ability to define an error handler (on error goto x) is missing.