Jump to content

Recommended Posts

Guest itman
Posted

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

-Thanks

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
Posted

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)

Posted

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.

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
×
×
  • Create New...