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:
has anybody got a clue of why this error is coming up?...Error> 9 - Subscript out of range: 'SplitDataA' on line 145
i know for a fact data is coming, cuz i added a message box like:
and it come up with:Code:wskScript(0).GetData DataRecieved, vbString msgbox DataRecieved
anyone got a clue on dis one?.. its prolly jst the fact of the vb / vbscript differences.... but :shrugs:---------------------------
VBScript
---------------------------
## cmdDL :$: LT ## cmdSN :$: 127.0.0.1
---------------------------
OK
---------------------------




Reply With Quote