Results 1 to 2 of 2

Thread: mscomm

  1. #1
    cool_rockz
    Guest

    mscomm

    I am using com port 1 to read continious string of data at baud rate 4800,n,8,1 form a serial device

    What can I do to detect a certain start of the string from this devise so that I can then manuplate the rest of the string. The start of the string in chr$(&H2).(hexi 02)

    I tried the following:
    Do
    ' DoEvents
    Dim instring As String
    Loop Until MSComm1.Input = Chr$(h2)
    instring = MSComm1.Input

    this doesnt work...

  2. #2
    Addicted Member
    Join Date
    Apr 2000
    Location
    England
    Posts
    246
    try this:

    Code:
    Dim instring As String 
    msComm1.inputlen = 1 'this will tell it to read 1 character at a time
    Do 
    DoEvents
    instring = MSComm1.Input 
    Loop Until instring = chr$(&h2)
    Some Days, i just get this feeling that i'm helping to write dozens of Viruses...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width