Question Locked

How do I access the Serial Port using WSH?

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

New to writing WSH scripts. Trying to write one that will read the data coming in through the Serial Port (COM1) and either create a text file (and append with each new string of data) or send that data to an Access DB.

What object, method or property do I use to do this?

EDIT ADD: Am finding out that the script language is probably pretty archaic. I do not have Visual Studio so I am getting compile errors when trying to run scripts written for Visual Basic or VB.Net. Therefore, I need this script to be strictly in WSH commands, VBScript 5.7 or in VBA (to insert in Access Module).

3 replies

by slayer_

A friend of mine had to code in C, a data send and receive over serial, creating his own packets, redundancy, etc. How to do that in a higher language though, no idea.

by robo_dev

General info regarding com ports as input:
http://support.microsoft.com/kb/60716

The challenge may be if it's a single data input, such as a barcode input, or if it's a continuous input data stream.

Some ways to to it in VBScript
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1249220953

A bit off-topic, but neat serial port product:
http://www.serial-port-redirector.com/

this lets you forward the serial port over the network

This discussion is closed to new replies.