You can trigger a function with the body onload event, that selects one of the local printers and then prints the contents of the page (body.innerText) using FSO instead of .print(). This will require your IE settings to allow ActiveX controls.
// GETTING LOCAL PRINTERS
var WshNetwork = new ActiveXObject("WScript.Net
var oPrinters = WshNetwork.EnumPrinterConn
for (var i=0; i<oPrinters.Count(); i+=2) {
var printer_port = oPrinters.Item(i);
var printer_name = oPrinters.Item(i+1);
alert("Printer " + printer_name + " attached to Port " + printer_port );
}
// PRINTING USING FSO
var printer_port = "LPT1";
// Open print device as a file and send text to print device using the File System Object
var objFS = new ActiveXObject("Scripting.F
var objPrinter = objFS.CreateTextFile(print
objPrinter.Write(document.
HTH
Mingshuo
Main Topics
Browse All Topics





by: mplungjanPosted on 2003-10-09 at 08:56:56ID: 9521642
absolutely not.
Closest is either a wsh using activeX or perhaps scriptX from http://www.meadroid.com/