Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outputting to com ports

Status
Not open for further replies.

EEalmost

Technical User
Jun 14, 2007
7
I can output a string to com port 1 with the following code:

Dim fs, b
Set fs = CreateObject("Scripting.FileSystemObject")
Set b = fs.CreateTextFile("COM1:",True)
b.Write &hFFFFFF

I'm trying to send data to COM1's base address, 0x3F8 (to send data) and an offset address 0x3FC (to control the RTS and DTR pins)

The following code doesn't send data to COM1:

Dim fs, b
Set fs = CreateObject("Scripting.FileSystemObject")
Set b = fs.CreateTextFile(&h3F8,True)
b.Write &hFFFFFF

I'm not sure on the formatting or should I go in a different direction.

Thanks


 
Don't think you can do that directly. You'll probably need some ActiveX DLL of some sort. Just google for

com port vbscript

There are loads of ActiveX components that you can download which will help you do the job with vbscript.
 
I was hoping to avoid paying for an ActiveX DLL in which I'm only using a small portion of it.
 
I was hoping to avoid paying for an ActiveX DLL
So, write your own.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top