Does anyone know how to set a default printer from a list of prints shown in a webpage? im using the tag <CFX_EnumPrinters> to enumerate the printers, but im not sure how to allow the user to pick the default. i found a script do this with vbscript, but i want to do it in a webpage: any help is appreciated! thank you in advance. :) Sub DefaultPrinter Dim Text, Title, i, j, tmp, printer Dim Network, oDevices ' Create a new Network object to access Network properties Set Network = CreateObject("WScript.Network") ' Read all printers Set oDevices = Network.EnumPrinterConnections Text = "Available printers" & vbCRLF For i = 0 To oDevices.Count-1 Step 2 j = i Text = Text & (i / 2) & vbTab Text = Text & oDevices(i) & vbTab & oDevices(i+1) & vbCRLF Next ' Show all available printers and allow a user selection tmp = InputBox (Text,"Set default printer",0) printer = oDevices(tmp * 2) ' select printer name ' Set the default printer Network.SetDefaultPrinter printer MsgBox "Set Default printer to " & printer, _ vbOkonly + vbInformation, Title Set Network = Nothing End Sub DefaultPrinter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188924 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54