SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
changing default printers and printing documen

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
changing default printers and printing documen
Author Message
Christi Elizondo



Joined: 11 Jul 2001
Posts: 4

Post changing default printers and printing documents Reply with quote

Dear Tech,

I have a program that runs on a network server that I have scheduled to launch off of my C: drive. I can retain my default printer in a buffer and change the printer, but when the report is ready to be printed, a popup box appears as if for the user to choose which printer to print report to. I thought by setting whichever printer number that I can connect to could be used as the default printer and automatically print to it. I have several network printers that I am connected to. The sole purpose is to have reports scheduled w/24x7 to print out on several network printers and deactivate itself. What am I doing wrong? Help.

Christi

Wed Jul 11, 2001 2:22 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: changing default printers and printing documen Reply with quote

Is this "Select Printer" message displayed by your program?
Does your program display the same message when you run it manually?
Do you use PrinterSetDefault method in 24x7?

: Dear Tech,

: I have a program that runs on a network server that I have scheduled to
: launch off of my C: drive. I can retain my default printer in a buffer and
: change the printer, but when the report is ready to be printed, a popup
: box appears as if for the user to choose which printer to print report to.
: I thought by setting whichever printer number that I can connect to could
: be used as the default printer and automatically print to it. I have
: several network printers that I am connected to. The sole purpose is to
: have reports scheduled w/24x7 to print out on several network printers and
: deactivate itself. What am I doing wrong? Help.

: Christi

Wed Jul 11, 2001 3:07 pm View user's profile Send private message
Christi Elizondo



Joined: 11 Jul 2001
Posts: 4

Post Re: changing default printers and printing documen Reply with quote

: Is this "Select Printer" message displayed by your program?
: Does your program display the same message when you run it manually?
: Do you use PrinterSetDefault method in 24x7?

The select printer message only comes up when I'm scheduling the script file I created in 24x7. The script routine only calls another executable created from VB and prints the output that I'm setting the printer to.

If I just launch the executable, the report prints directly to my default printer.

Example:

// This is a test to run lab reports and print to usergroup.

Dim (default_prntr, String)
Dim (process, Number)

// Remember name of the default printer
PrinterGetDefault default_prntr

// Change default printer to PR3016 on PSHORF02
PrinterSetDefault "\\PSHORF02\PR3016,winspool,Ne08:"

// Print daily status report using PR3016
RunAndWait("v:\Groups\Aspentech\Install\PrntTest.exe", "v:\Groups\Aspentech\Install",2000,process)
// Change default printer to PR3024 on PSHORF02
PrinterSetDefault "\\PSHORF02\PR3024,winspool,Ne09:"
// Print daily status report using PR3024

Run("v:\Groups\Aspentech\Install\PrntTest.exe", "v:\Groups\Aspentech\Install",process)
// Restore default printer as it was before
PrinterSetDefault default_printer

--------------------

The executable has a print command that just prints to default printer.

Wed Jul 11, 2001 4:19 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: changing default printers and printing documen Reply with quote

Try PrinterSetDefault "PR3016" using just the printer name as it appears in the Settings / Printers

: The select printer message only comes up when I'm scheduling the script file
: I created in 24x7. The script routine only calls another executable
: created from VB and prints the output that I'm setting the printer to.

: If I just launch the executable, the report prints directly to my default
: printer.

: Example: // This is a test to run lab reports and print to usergroup.

: Dim (default_prntr, String)
: Dim (process, Number)

: // Remember name of the default printer
: PrinterGetDefault default_prntr

: // Change default printer to PR3016 on PSHORF02
: PrinterSetDefault "\\PSHORF02\PR3016,winspool,Ne08:"

: // Print daily status report using PR3016
: RunAndWait("v:\Groups\Aspentech\Install\PrntTest.exe",
: "v:\Groups\Aspentech\Install",2000,process)
: // Change default printer to PR3024 on PSHORF02
: PrinterSetDefault "\\PSHORF02\PR3024,winspool,Ne09:"
: // Print daily status report using PR3024

: Run("v:\Groups\Aspentech\Install\PrntTest.exe",
: "v:\Groups\Aspentech\Install",process)
: // Restore default printer as it was before
: PrinterSetDefault default_printer

: --------------------

: The executable has a print command that just prints to default printer.

Wed Jul 11, 2001 4:25 pm View user's profile Send private message
Christi Elizondo



Joined: 11 Jul 2001
Posts: 4

Post Re: changing default printers and printing documen Reply with quote

: Try PrinterSetDefault "PR3016" using just the printer name as it
: appears in the Settings / Printers

Thanks for your help but I do believe that the problem does reside when I'm using the printersetdefault command. it does not even really recognize the original default settings I saved in the buffer area.

Wed Jul 11, 2001 5:46 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: changing default printers and printing documen Reply with quote

Not sure if I understood your reply. What do you mean in "it does not even really recognize the original default settings I saved in the buffer area?"

By the way, you also need to replace every back-slash in your script with a double back-slash (see on-line help on "Special ASCII characters" for details)

: Thanks for your help but I do believe that the problem does reside when I'm
: using the printersetdefault command. it does not even really recognize the
: original default settings I saved in the buffer area.

Wed Jul 11, 2001 7:10 pm View user's profile Send private message
Christi Elizondo



Joined: 11 Jul 2001
Posts: 4

Post Re: changing default printers and printing documen Reply with quote

I finally figured it out. Sorry, it took so long to post my response back. Have not had a chance to return to this subject. I just noticed that one of your comments posted suggested that to make sure to add another backslash whenever using them in scripts....

Thanks a bunch.

Thu Aug 16, 2001 11:00 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.