[RESOLVED] [Solved] VBScript: Split String...
Hi guys,,
I need to split incoming data into seperate items of an array... now in Visual Basic this is easy...
in VBScript: i dunno why but its crapped up.
I need to use it like the following:
VB Code:
Sub wskScript_DataArrival(Index, bytesTotal)
'On Error GoTo ErrHand:
'On Error Resume Next
Dim SplitDataA(), DataArrival(), DataRecieved
Dim i
wskScript(0).GetData DataRecieved, vbString
SplitDataA() = Split(DataRecieved, " ## ")
For i = 1 To UBound(SplitDataA())
DataArrival() = Split(SplitDataA(i), " :$: ")
Select Case DataArrival(0)
only problem is:
when i get to the following code:
VB Code:
SplitDataA() = Split(DataRecieved, " ## ")
i get the following error come up:
Quote:
Error> 9 - Subscript out of range: 'SplitDataA' on line 145
has anybody got a clue of why this error is coming up?...
i know for a fact data is coming, cuz i added a message box like:
Code:
wskScript(0).GetData DataRecieved, vbString
msgbox DataRecieved
and it come up with:
Quote:
---------------------------
VBScript
---------------------------
## cmdDL :$: LT ## cmdSN :$: 127.0.0.1
---------------------------
OK
---------------------------
anyone got a clue on dis one?.. its prolly jst the fact of the vb / vbscript differences.... but :shrugs: