Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

automactically redirecting pass-through printer ascii data to file

Status
Not open for further replies.

dhazer

Programmer
Oct 20, 2006
48
I'm trying to find a way to redirect the data sent to the pass-through printer to a text file.

One company (dubbyai.com) is able to do it. A little window even pops up that says something like "downloading ascii file" or "transfering ascii file".


I noticed that when the file printer doesn't capture properly, the entire text scrolls across the screen, so I could try to make it scroll across the screen and do a screen capture, but that's not as clean as a file transfer.

Do any of you pros have an idea where a person might start?


Thanks,
Dan
 
Thanks for that link, knob.

A modification of that script seems to be what I want, except the DEDPRN3A.WAS script thinks that it is done receiving data and ready to print right at the beginning of when the script starts sending data (I'm using WYSE 50 emulation which I verified that the script is recognizing and has support for).

It's not even writing to the DEDPRN.CAP file.

Knob, have you come across this?
 
Hi Dan, sorry to take so long to get back to you, been away for early Thanksgiving the past few days.

I'm not terribly familiar with the scripts in the package I referred you to, but it does work on my system with VT-100 emulation.

I looked back at your original message and you mentioned pass-thru printing. Is that equivalent to dedicated printing (which this script re-implements) or transparent printing? I forget the actual differences, but was thinking there are two different types of automated printing, both of which Procomm supports.

If you follow the usual steps in Procomm without the script running, do you get a message about dedicated print in Procomm's status line? If so, then this script should be the one to use with a little tweaking. To save the capture file that is created by the srcript, you'll want to delete the delfile TempFilePath line so that the script does not delete the capture file when cleaning up.

 
Wow, it's been a while since I've been able to get at this issue with some detour projects, but I'm back at it again.

I think it was transparent printing that I was referring to.

I made a script (shown below) that count the start and stop characters that the three scripts use which you recommneded to me script. There are 0 occurances of the character that signifies to start printing (PrinterOn="^X") and multiple occurances of the character to stop printing (PrinterOff="^T"). I also had the script look for the 4 other types of "start printing" characters.

Even if I could find the right character for the script to start working, it would stop in the middle of the file transfer.

I tested the non-dos aspects scripts under the 4 possibilities where the scripts for the checkmark boxes "Disable host printing" and "raw print mode" under the menu Options->Data Options->Terminal Options.

I tried to capture the scrolling screen data as RAW ("write text as it appears on screen") and that only showed several vertical bar-like unknown/unidentified characters. So that didn't help me identify the start and stop characters.


Do you have any idea how to find out which the start and stop characters are for procomm Plus 4.7 under Windows 2000?

--dan

 
Oops, here is the my script to to count the start printing and stop printing strings:


string PrinterOn, PrinterOff
integer numOfStarts, numOfStops
proc main

PrinterOn="^X"
PrinterOff="^T"

numOfStarts = 0;
numOfStops = 0;

when target 0 PrinterOn call addOn ;watch for on string
when target 1 PrinterOff call addOff ;watch for "printer off" sequence
when userexit call RestoreExit

while 1
yield
endwhile
endproc

proc addOn
numOfStarts++
endproc

proc addOff
numOfStops++
endproc

proc RestoreExit
usermsg "Starts: %i `n Stops: %i" numOfStarts numOfStops
exit
endproc
 
wyse 50 emulation (wyse 5 adn 60's have been used in the past, but in procomm plus it's wyse 50)

 
Sorry I haven't been able to work on this one more. The next thing I would try is turning off host printing in the Procomm Setup dialog and running your script again to see if the characters show up. It's possible that Procomm may be grabbing and acting on those strings so your script would never see them, but that may not be true if you disable host printing. You can do this by selecting the Options | Data Options | Terminal Options menu item, choosing Wyse 50 if necessary, checking the Disable host printing box, and clicking OK. If your script then can see the character, trying running the printing scripts from earlier in this thread and see if they work then.

 
OK, finally was able to dig up my book and it looks like it has ^R for auxiliary print on and ^T to turn it off. There are also two other possible escape sequences, ^[L to send all characters unformatted to the aux port and ^[P to send all (formatted I presume) characters to the aux port.

You can use Procomm's Monitor Window to see what the remote system is sending and then tailor the script to match it. Below is some information I copied from my site:

Procomm's Monitor Window can be used to view the incoming and outgoing data, in both hex and ASCII format. To activate this window, select the Data | Monitor Window menu item. Resize the Monitor Window so that you can view the entire width of the window, then click back in the Procomm Plus window so that the Monitor Window does not have focus. Incoming text is displayed in red, while text you send is colored blue. The Monitor Window can be handy for viewing incoming escape sequences (to determine if Procomm Plus is responding properly to them) or to verify that the program is sending the data you think it should be.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top