I am very very green at VB Scripts but trying hard to learn. I have an application for a home automation computer that uses VB Scripts. I need to extract just the first portion of the string and it's my understanding that I need to "Parse" the string. Here is the Script:
sub Devices_CIDUpdate(ID)
If ID = "1234567890" Then
Character.Speak "Steve is calling"
else
Server.EntryLog("Caller ID: " & ID)
End If
end sub
The HA computer sends the following string;
1234567890U.S. CELLULAR 01301200
The last 8 numbers are a time stamp sent by the phone carrier.
What I need to do is "Parse" or exclude everything except the 1st 10 numbers (phone number). Any help would be greatly appreciated.
sub Devices_CIDUpdate(ID)
If ID = "1234567890" Then
Character.Speak "Steve is calling"
else
Server.EntryLog("Caller ID: " & ID)
End If
end sub
The HA computer sends the following string;
1234567890U.S. CELLULAR 01301200
The last 8 numbers are a time stamp sent by the phone carrier.
What I need to do is "Parse" or exclude everything except the 1st 10 numbers (phone number). Any help would be greatly appreciated.