If i split a string via vbscript, it throws an error when i try and read/list one of the elements values - what am I missing here (see attached project)?
TJ
If i split a string via vbscript, it throws an error when i try and read/list one of the elements values - what am I missing here (see attached project)?
TJ
Hi TJ
The problem here was that you were performing VBScript operations on your Automise variables. This will work in some cases, but in other cases you will get strange results (as you were seeing when trying to access array elements).
The best way to approach this is to declare all the variables required for your VBScript logic inside your script action rather than creating Automise variables for this. This means that you will only require Automise variables to provide input to your script and possibly another variable for the output.
So in this case I have one Automise variable for the input (filename) and another for the output (fileversion). All the variables required to process this filename and get the version are declared within the VBScript itself (using the 'Dim' statement).
I have re-worked your project and attached it.
Hope this helps.
Regards,
Steve
GetArrayStringIssue_2.atz3 (2.274 KB)Good to know and thanks for quick response, that makes much more sense now you've explained it...
TJ
No problems, glad to be able to help.
Regards,
Steve