Rocket Software Homepage
Forum Home Forum Home > AccuTerm Knowledge Base (read only) > Scripting & Automation
  New Posts New Posts RSS Feed - Script to select specific printer
  FAQ FAQ  Forum Search   Register Register  Login Login

The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum.

Forum LockedScript to select specific printer

 Post Reply Post Reply
Author
Message
Bojangles View Drop Down
Newbie
Newbie


Joined: January 27 2004
Location: United States
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bojangles Quote  Post ReplyReply Direct Link To This Post Topic: Script to select specific printer
    Posted: January 27 2004 at 5:31am
I need to see a script that will select a specific printer instead of the default, while running my application, then switch back to the default when it is finished. Anyone?
Back to Top
Bojangles View Drop Down
Newbie
Newbie


Joined: January 27 2004
Location: United States
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bojangles Quote  Post ReplyReply Direct Link To This Post Posted: January 28 2004 at 1:17am
Aw come on. there has to be a way to do it. IN accuterm you can screen print to whatever printer is chosen in the setup. I need a way to automatically select the printer I wan't. I don't want the end user to have to manually do this. There has to be a way. Anyone? Bueller? Anyone?
Back to Top
PSchellenbach View Drop Down
Admin Group
Admin Group

Moderator

Joined: December 15 2003
Location: United States
Status: Offline
Points: 2150
Post Options Post Options   Thanks (0) Thanks(0)   Quote PSchellenbach Quote  Post ReplyReply Direct Link To This Post Posted: January 28 2004 at 4:48am
You can use a script to change the printer assignment in AccuTerm. First, you need the exact printer name used by Windows. To get the correct name, open an AccuTerm session, open the Settings dialog, select the Printer tab and select the specific printer you want. Click OK, then save the session file. Using Notepad, open the session file and look for the line that starts with Printer= and note the exact printer name.

In your host program, use the following script to assign the printer:

PTR = '\\BUS\LAZER on Ne04:'
PRINT CHAR(27) : CHAR(2) : 'P InitSession.PrinterName = "' : PTR : '"' : CHAR(13) :

Use the actual name for your printer in the "PTR = " statement.

You may need to add a SLEEP 1 statement after changing the name for older versions of AccuTerm.
Back to Top
Bojangles View Drop Down
Newbie
Newbie


Joined: January 27 2004
Location: United States
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bojangles Quote  Post ReplyReply Direct Link To This Post Posted: January 28 2004 at 7:46am
Hey! Thanks A million. I knew there was a way, and I tried a script I wrote but couldn't get past the errors. I am more familiar with a product called wintegrate. Here we use accuterm. Thanks again for your help, if this works, it has solved a huge potential human error factor!
Back to Top
anonymous View Drop Down
Groupie
Groupie


Joined: January 15 2004
Location: United States
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote anonymous Quote  Post ReplyReply Direct Link To This Post Posted: August 15 2006 at 4:47am
Is there anyway I can, from the host, tell the AccuTerm client to invoke graphic print mode, and establish certain local printer driver settings (specifically Portrait/Landscape) prior to turning Slave-on and sending reports?
Back to Top
PSchellenbach View Drop Down
Admin Group
Admin Group

Moderator

Joined: December 15 2003
Location: United States
Status: Offline
Points: 2150
Post Options Post Options   Thanks (0) Thanks(0)   Quote PSchellenbach Quote  Post ReplyReply Direct Link To This Post Posted: August 15 2006 at 4:52am
Hi All -

You can use a similar script to set any printer properties from the host. For example, to set the slave printer to Graphics mode, Landscape orienetation, use:

SCR='InitSession.SlavePrintMode = 1':CHAR(25)
SCR=SCR:'InitSession.PrinterOrientation = 2'
PRINT CHAR(27):CHAR(2):'P':SCR:CHAR(13):

Thanks,

Pete
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.