PDA

View Full Version : How to write commands to com port?


joker
08-28-2002, 04:38 AM
Hi all,

I have a serial printer connected to my PC which uses a generic text printer
driver under windows. To print, I copy a text file (including the commands)
to the com port. Here is an example of such a text file:

^XA
^LH30,30
^FO20,10^AD^FDMYTEXTHERE^FS
^XZ

Are there suggestions on how to send these commands to the comm port by
using the browser and Javascript?

thanks,
joker

joh6nn
08-28-2002, 03:27 PM
can't be done

beetle
08-28-2002, 03:48 PM
There *may* be some propriety stuff that can be done with an HTA using javascript/vbscript.

You can read up on HTA's here (http://msdn.microsoft.com/workshop/author/hta/hta_node_entry.asp?frame=true)

joh6nn
08-28-2002, 05:50 PM
nope. can't be done.

scroots
08-28-2002, 08:51 PM
if it was possible think of its missuse you could visit a site and when you left the page up whilst going for tea it could print thousands of meesages out.

scroots

jkd
08-28-2002, 09:14 PM
Originally posted by scroots
if it was possible think of its missuse you could visit a site and when you left the page up whilst going for tea it could print thousands of meesages out.

scroots

You already can with IE, without a warning... due to a "safe" ActiveX printing control....