Jump to content

How to check for a free serial port?

Recommended Posts

Use the following code:

$RESULT = _WinAPI_CreateFile(".COM10", 2, 2)
If $RESULT = 0 then
  msgbox(0, "", "Port 10 is not free")
  msgbox(0, "", "Port 10 is free")


:bye: Hey there, was I helpful?


My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...