ericli03 Posted June 19, 2013 Share Posted June 19, 2013 I want to use com1 to com2 at the same time in same computer. 1.com1 send string abcde to com2 (At this time will receive com2 message) 2.com2 send string abcde to com1 (At this time will receive com1 message) I try to use the code. while 1 $a = "abcdefhhijklmnopqrstuvwxyz1234567890abcdefhhijklmnopqrstuvwxyz1234567890" _CommSwitch(1) _CommSendString($a) _CommSwitch(2) _CommSendString($a) _CommSwitch(1) $test1 = _Commgetstring() _CommSwitch(2) $test2 = _Commgetstring() wend But it seems that there is a delay time. _Commgetstring() always not receive the full message.(Only received abcdefg) What do I do wrong? If want to send message with delay time.(Use $a Send message,press a then sleep (100) ) . How should I do? Or with only the following methods .. _CommSendString("a") sleep(100) _CommSendString("b") sleep(100) _CommSendString("c") Please help. Thank. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now