#This script shows the use of a complex waitfor action on a serial tester via TCP #Create a tcp serial tester and assign it to the server variable server = new Serial("TCP") #open server port 65500 server.open(65500) #Create another tcp serial tester and assign it to the client variable client = new Serial("TCP") #connect to the server on the localhost port 65500 client.open("localhost",65500) server.send("Hello from the server\n") #Checkout the trace window! client.waitfor(10,"'Hello' and 'server' and not 'client'") client.send("Hello from the client\n") #You can also include brackets () and the operator or server.waitfor(10,"('Hello' or 'client') and not 'server'") client.close() server.close() delete server delete client sleep(2)