Re: Choosing printer from within a script
> Well, actually, I would also need to select the current printer. Do you > think that might set off antivirus software? Perhaps, I'm not sure. > I am pretty sure I could get a list of printers just by getting the > files in the printer folder - but choosing a current printer, so that > the subsequent print command prints on that printer, is a different > matter. True. > I really wish that was an inherent part of transcript. So do I! Ken Ray Sons of Thunder Software Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
RE: Choosing printer from within a script
Well, actually, I would also need to select the current printer. Do you think that might set off antivirus software? I am pretty sure I could get a list of printers just by getting the files in the printer folder - but choosing a current printer, so that the subsequent print command prints on that printer, is a different matter. I really wish that was an inherent part of transcript. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ken Ray Sent: Thursday, June 23, 2005 9:32 PM To: Use Revolution List Subject: Re: Choosing printer from within a script On 6/23/05 1:23 PM, "Lynch, Jonathan" <[EMAIL PROTECTED]> wrote: > Thanks Ken! > > What versions of windows allow you to use Vbscript in this way? I see > many uses for such a thing. All of 'em... (actually I think you need to have at least Internet Explorer 4.x or later in Windows 95). However different versions of the OS will support different sets of functionality depending on what you're asking for. Keep in mind that certain VBS actions may trigger anti-virus detectors (generally anything that manipulates files like the FileSystem object). But if you're just "getting" info, you should be safe. Ken Ray Sons of Thunder Software Web site: http://www.sonsothunder.com/ Email: [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Choosing printer from within a script
On 6/23/05 1:23 PM, "Lynch, Jonathan" <[EMAIL PROTECTED]> wrote: > Thanks Ken! > > What versions of windows allow you to use Vbscript in this way? I see > many uses for such a thing. All of 'em... (actually I think you need to have at least Internet Explorer 4.x or later in Windows 95). However different versions of the OS will support different sets of functionality depending on what you're asking for. Keep in mind that certain VBS actions may trigger anti-virus detectors (generally anything that manipulates files like the FileSystem object). But if you're just "getting" info, you should be safe. Ken Ray Sons of Thunder Software Web site: http://www.sonsothunder.com/ Email: [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
RE: Choosing printer from within a script
Thanks Ken! What versions of windows allow you to use Vbscript in this way? I see many uses for such a thing. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ken Ray Sent: Thursday, June 23, 2005 2:19 PM To: Use Revolution List Subject: Re: Choosing printer from within a script On 6/23/05 11:13 AM, "Lynch, Jonathan" <[EMAIL PROTECTED]> wrote: > > Are there shell commands that either return a list of available > printers, and that allow you to pick your printer? You can use VBScript for this, and run VBScript from Rev. Here's a page where they talk about getting the list of printers (EnumPrinterConnections): http://www.computerperformance.co.uk/Logon/logon_enumprinterconnections. htm To call VBS from Rev, you basically create a file with the extension ".vbs" (through put url("file:") or open file/write file/close file) and then execute it, and then delete it (so it doesn't lie around). Here's what I use: function doVBS pVBScript,pDirectConsole if pDirectConsole = "" then put "C:\vbs_temp.vbs" into tVBSPath put pVBScript into url ("file:" & tVBSPath) set the hideConsoleWindows to true get shell("cscript.exe //nologo" && tVBSPath) else set the hideConsoleWindows to true get shell("cscript.exe" && pVBScript) end if put it into tResult if there is a file tVBSPath then send "delete file" && quote & tVBSPath & quote to me in 1 second end if if tResult <> "" then return tResult end doVBS HTH, Ken Ray Sons of Thunder Software Web site: http://www.sonsothunder.com/ Email: [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Choosing printer from within a script
On 6/23/05 11:13 AM, "Lynch, Jonathan" <[EMAIL PROTECTED]> wrote: > > Are there shell commands that either return a list of available > printers, and that allow you to pick your printer? You can use VBScript for this, and run VBScript from Rev. Here's a page where they talk about getting the list of printers (EnumPrinterConnections): http://www.computerperformance.co.uk/Logon/logon_enumprinterconnections.htm To call VBS from Rev, you basically create a file with the extension ".vbs" (through put url("file:") or open file/write file/close file) and then execute it, and then delete it (so it doesn't lie around). Here's what I use: function doVBS pVBScript,pDirectConsole if pDirectConsole = "" then put "C:\vbs_temp.vbs" into tVBSPath put pVBScript into url ("file:" & tVBSPath) set the hideConsoleWindows to true get shell("cscript.exe //nologo" && tVBSPath) else set the hideConsoleWindows to true get shell("cscript.exe" && pVBScript) end if put it into tResult if there is a file tVBSPath then send "delete file" && quote & tVBSPath & quote to me in 1 second end if if tResult <> "" then return tResult end doVBS HTH, Ken Ray Sons of Thunder Software Web site: http://www.sonsothunder.com/ Email: [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Choosing printer from within a script
Is this possible in Windows? What I want to do is create a custom printer dialog. For the most part, that should not be too difficult. However, choosing which printer you want to print on is both important, and something for which I do not see an obvious technique. There does not appear to be any function like: Put the printers into field myField Or Set the printer to myPrinterName I would use the system printer dialog, except that it causes problems when trying to print multiple collated copies (windows 2000) - it only prints one copy. This means, if you want to print multiple copies, you have to print them unCollated, then collate them yourself after printing - very annoying. Are there shell commands that either return a list of available printers, and that allow you to pick your printer? ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution