Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Printing a text file

Posted on 1998-07-05
9
Medium Priority
?
230 Views
Last Modified: 2010-04-16
Hi I have to do a project in pascal 7 my project is finished
and it saves a report to a text file, now I would like to write a procedure that will test if the printer is on, on-line, has paper in etc and if all these are true, it must print the text file. I need help urgently!! Please.
0
Comment
Question by:Gurkin
[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
  • 5
  • 3
9 Comments
 
LVL 2

Expert Comment

by:omsec
ID: 1217158
I have never done that, so I only post this as Comment and not as an Anwser, but in TP/BP is a unit called PRINTER.TPU. Just add this to the USES-Clause of your program and see the Documentation about its procedures.
0
 

Author Comment

by:Gurkin
ID: 1217159
I don't have the printer.tpu unit do you know where I could get it? maybe you could mail it to me?
0
 
LVL 2

Expert Comment

by:omsec
ID: 1217160
ok...give me ur eMail or ICQ
0
[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

 

Author Comment

by:Gurkin
ID: 1217161
my E-mail is : psychoted@intekom.co.za
0
 
LVL 2

Expert Comment

by:omsec
ID: 1217162
uhm i couldnt find the file on my HDDs so it probly has to be linked in the TPU Library. Just try to add Printer or Printers in the uses-clause of or program
0
 

Author Comment

by:Gurkin
ID: 1217163
thanx i appreciate your help
0
 

Author Comment

by:Gurkin
ID: 1217164
omsec I put printer in my uses and there are no problems, now how do I use it????
0
 

Accepted Solution

by:
scroll earned 200 total points
ID: 1217165
Here is the code to test if the printer is working and send something to it:

uses printer;
begin
  {$I-}
  write (lst, #0);
  {$I+}
  if IOResult <> 0 then
    write ('Printer off, not present or not ready')
  else
    write (lst, 'whatever');  {Send the string 'whatever' to the printer}
end.

Regards,
Scroll

0
 

Author Comment

by:Gurkin
ID: 1217166
Thanx a million scroll, I really appreciate it......... cheers
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Check out what's been happening in the Experts Exchange community.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Suggested Courses

719 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