Serial Port - Notification of appear/disappear?

Hello all,

Does anyone know of a way to detect when a serial port appears or disappears? For example, the Serial Port is in use, and the USB adapter is suddenly removed.The error event will not fire, since there is no longer an object to do so.

Ideas would be appreciated!
Thank you,
Tim

create a timer, in the loop count the serialports, if it changes, then fire an event to the app.

This tutorial may help.

https://www.xojo.com/resources/serialport.php