Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Capture Printer output and convert to ASCII text file.

Posted on 2004-09-23
3
Medium Priority
?
1,381 Views
Last Modified: 2013-12-26
Hi All,

I need to develop a tool that automatically creates a Generic/Text only printer on FILE port when no such printer exist in the local m/c. Also when some files are choosed to print thro the Generic Printer, it has to generate a ASCII text file and have to store it in a pre-defined path set thro this application.

I successfully created a Generic printer on FILE port. I like to know the ways to supress this file name pop-up and I have to supply the file name internally thro the application. Here for each print thro the generic printer on FILE port systems asks the File name. I'm unable to suppress the file name prompt pop-up.

Could you pls guide me how to supress that pop-up and programatically assinging the FILE name, also give me some code samples url.

Thanks in advance,
Arnee...


0
Comment
Question by:Arnee_Senthil
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Expert Comment

by:x_terminat_or_3
ID: 12134036
You know, in VB you can just open a file and 'print' to it.  You can set the filename in the code or ask user info.

Please tell us if this will help you.


With kind regards



Ramses (x_terminat_or_3)
0
 
LVL 12

Accepted Solution

by:
fulscher earned 375 total points
ID: 12137064
Arnee,

I just checked; the function to ask for a file name is part of the windows subsystem. I think you can't override that.

I see three options:

1/ find a text printer driver which does not ask for a file name
2/ redirect the printer output to a program
3/ create a small utility which waits for the printer dialog to pop up, fills in a name into the text field and closes the dialog.

Option 2 is probably the easiest; there is a program called RedMon (Redirection Port Monitor) which is supposed to do this. Check out http://www.cs.wisc.edu/~ghost/redmon/en/redmon.htm .

Redmon redirects the output to the standard input of any program - so, you need to write a small program which reads input from stdin and creates a file which you then can process by you program.

HTH, Jan
0
 
LVL 1

Author Comment

by:Arnee_Senthil
ID: 12159323
Hi HTH,

I used ur 3rd idea and developed a small prog that monitors the Task Manager for specified pop-up window's name. Once it caught that window, it pastes the file path and name and sends that <Enter> key to close the pop-up. I got the task manager watchdog prog. from the following url.

http://www.zarr.net/vb/download/codedetail.asp?code=11

Thanks a lot,
Cheers,
Arnee...
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question