|
-
Nov 21st, 2000, 01:53 AM
#1
Thread Starter
Addicted Member
How can I search through the MSComm control input for certain strings. For example I need to perform certain actions based on what I am recieving. In one instance I recieve "CONNECTED" (without the quotes) and as soon as it is recieved I need to send a carriage return. I need to search for several different strings at various times throughout the connection. Any help is greatly appriciated.
-
Nov 21st, 2000, 05:41 AM
#2
Addicted Member
Hi there,
I assume that you know exactly what you are expecting, so this isn't too hard:
Pos=Instr(1,StringToSearch,StringToSearchFor,vbBinaryCompare)
If Pos<>0 then
'The string you sought was found in the string you searched
'Do wot you do here
end if
Get the idea?
André
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|