Sign in to follow this  
Followers 0
Guest itman

Serial Port....

6 posts in this topic

I'm just wondering if I can use AutoIt to read/write to the serial port? (Com1)

-Thanks

Share this post


Link to post
Share on other sites



I am pretty sure of not.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I just tried FileWriteLine('com1', 'test') and after running I had no file by the name 'com1'... So I guess it has been sent the com1 port...

I don't have a serial cable to connect two computers but since you're asking you might be able to test this...

Try opening the file 'com1' and check if you can read and/or write the data you want.

EDIT: Does NOT work!

Edited by sugi

Share this post


Link to post
Share on other sites

you could also use the command interpretter (command prompt) via autoit, lookup @comspec, you can do anything that you'd do in "dos"...

RunWait(@ComSpec & " /c " & 'type "' & $somefilewriteninAutoit & '">com1' )

or something like that?


"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

I just tried FileWriteLine('com1', 'test') and after running I had no file by the name 'com1'... So I guess it has been sent the com1 port...

Sorry sugi, this is wrong. Check the result value or try to create a file called com1.

Device names such as COM1, CON or LPT1 are reserved words,

and they can't be used as folder or file names.

Share this post


Link to post
Share on other sites

Ok, then I guessed wrong.

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
Sign in to follow this  
Followers 0