Received Data manipulation

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
oferpeleg
Member
Posts: 8
Joined: Wed Nov 29, 2006 6:30 pm
Location: Tel Aviv, Israel

Received Data manipulation

Post by oferpeleg »

Hey Everyone,

Can some one tell me how can I compare just a specific part of an incoming ASCI string,

The received string is : Z00099000000000H
And I want to check only the first 5 characters for example,
I know that I can do it with a script but I got to know if it can be done internally.
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

There's no way to do it internally, so you will have to do it in a script.
Scott
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

And for what it's worth... in a script:

Data = YourString 'Z00099000000000H
Select Case Left(Data, 5)
Case "Z0009": Do This
Case "Z0010": Do That
End Select
Post Reply