I am working on programme for a client. He has to use the programme for selecting electrical gear motor out from specifications. The programme contains data for around 2000 motors. For each motor there are 12 spefications.
There has no problems in making the programme, and it works fine on a stand-alone computer.
For printing the stand-alone computer the programme has to have:
OPEN "LPT1:" FOR OUTPUT AS #1
PRIN #1, . . .
.
.
PRINT CHR$(13): CLOSE #1: END
But what do write when the computer is a net work computer? The programme has only to work on one of his computers.
The printer is a HP Laser Jet Pro MFP M127fn.
The IP-adress is: 10.0.0.196, and port is 9100 raw.
I am looking foward seeing something smart, thanking you
am remain yours sincerely
Niels Olsen
PS: I wrote similar message a few days ago, but when using "Save Draft" it was deleted!
Printer and Computer Net work
-
- Posts: 29
- Joined: May 28, 2006 18:32
- Location: denmark
Re: Printer and Computer Net work
For this to work, you'll have to use (include) a Network-Library into the program.niels olsen wrote:But what do write when the computer is a net work computer?
The programme has only to work on one of his computers. (this is not relevant)
The printer is a HP Laser Jet Pro MFP M127fn.
The IP-adress is: 10.0.0.196, and port is 9100 raw.
See the section titled "Libraries" ...
No, its probably still there, but only "inside" your "user profile". Log yourself "in" and check it out.niels olsen wrote:PS: I wrote similar message a few days ago, but when using "Save Draft" it was deleted!
To commit (your article) to the Forum, you'll have to press the "Submit"-button !!!
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: Printer and Computer Net work
Code: Select all
#include once "snc.bi"
' test of a printer client connection
const as string ServerIP = "10.0.0.196"
const as ushort ServerPort = 9100
' connect to printer server
var client = NetworkClient(ServerIP,ServerPort)
' get a connection from ConnectionFactory
var connection = client.GetConnection()
' ready to send ?
while connection->CanPut()<>1: sleep 100 : wend
' put data on the connection
connection->PutData(@yourData,SizeOfYourData)
sleep