Auto find serial port, script problem

You might consider some exception handling. The Processing application is not going to be able to connect to a port that is already in use.