Event driven on add/remove Comport

3 posts in this topic

   I have been racking my brains on this forever but am not in-depth enough with AutoIt to figure it out. I want to write a program that will automatically jump to a function if a serial port is added or removed from a computer. I am not sure how to explain it other then that. 

   A simple example would be to write a program that will display "Comport Added" when a user adds a serial port to a computer (to be specific it will be a virtual serial port via a USB cable but will show up in device manager as a COM Port) and will display "Comport Removed" when a serial port is removed (pulling the USB cable).

  I would like it to be "event driven" so that no matter where the program is or what it is doing it will immediately jump to (and return from) a user defined function. Any ideas would be GREATLY appreciated......

Share this post

Link to post
Share on other sites

A million thanks genius257. Exactly what I was looking for.

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now