1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
oldp = -1 oldp2 = -1 while ( 1 = 1) if (peek("PORT1") <> oldp) then oldp = peek("PORT1") print "PORT1: ", oldp fi if (peek("PORT2") <> oldp2) then oldp2 = peek("PORT2") print "PORT2: ", oldp2 fi wend