Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-25 Thread Demosthenes Koptsis
Ευγε! On Fri, Sep 25, 2009 at 1:06 PM, Doriano Blengino wrote: > Vassilis A. Kanatas ha scritto: >> Yees!!! >> >> Gracia Doriano, >> Ευχαριστώ  Demosthenes >> Merci Benoit >> >> It is done! >> >> Doriano had right >> >> I had to add the lp group to the user Vassilis. >> >

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-25 Thread Doriano Blengino
Vassilis A. Kanatas ha scritto: > Yees!!! > > Gracia Doriano, > Ευχαριστώ Demosthenes > Merci Benoit > > It is done! > > Doriano had right > > I had to add the lp group to the user Vassilis. > I am glad you finally succeded! But, it's my habit (I had to be a teacher), I

[Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-25 Thread Vassilis A. Kanatas
Yees!!! Gracia Doriano, Ευχαριστώ Demosthenes Merci Benoit It is done! Doriano had right I had to add the lp group to the user Vassilis. I also had to put DIM hPrinter AS File !!! After that the correct code for printing 1 line each time is the following: PUBLIC SUB

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-24 Thread Doriano Blengino
Vassilis K ha scritto: > Is there any chance to find out why I get the message: > Access forbidden at the following Sub? And of course to make it work? > PUBLIC SUB bEktiposi_Click() > DIM hPrinter AS Printer > DIM hFile AS File > hPrinter = OPEN "dev/lp1" FOR OUTPUT >

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-24 Thread Doriano Blengino
Vassilis K ha scritto: > Is there any chance to find out why I get the message: > Access forbidden at the following Sub? And of course to make it work? > PUBLIC SUB bEktiposi_Click() > DIM hPrinter AS Printer > DIM hFile AS File > hPrinter = OPEN "dev/lp1" FOR OUTPUT >

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-24 Thread Vassilis K
Is there any chance to find out why I get the message: Access forbidden at the following Sub? And of course to make it work? PUBLIC SUB bEktiposi_Click() DIM hPrinter AS Printer DIM hFile AS File hPrinter = OPEN "dev/lp1" FOR OUTPUT hPrinter.EndOfLine = gb.Windows

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-24 Thread Benoît Minisini
> Benoît Minisini ha scritto: > >> these are shell commands, cat and echo > >> cat shows the contents of a file and echo print a string in screen > >> we use redirection which is > > >> to a device printer /dev/lp0 or lp1 or lp2 see what is your printer > >> > >> To print a file you can write in sh

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-24 Thread Doriano Blengino
charlesg ha scritto: > Hi, > > I tried printing line-by-line directly to the raw device and got into awful > overlapping (? buffering) problems. > > I think you would be far better to create a single line text file each time > and then print it with (for example): > SHELL "cat /home/charles/tilRcpt

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-24 Thread charlesg
Hi, I tried printing line-by-line directly to the raw device and got into awful overlapping (? buffering) problems. I think you would be far better to create a single line text file each time and then print it with (for example): SHELL "cat /home/charles/tilRcpt>/dev/lp0" It's blindingly quick

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-24 Thread Demosthenes Koptsis
see the manual man lpr man pr On Thu, Sep 24, 2009 at 3:18 PM, Vassilis K wrote: > > You are right! > > It works without root privileges with: > > echo "this is a test"" | lpr -P lpt2 > > but it feeds all the paper !! > I 'll try to find a way not to feed the paper !! > > ---

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-24 Thread Vassilis K
You are right! It works without root privileges with: echo "this is a test"" | lpr -P lpt2 but it feeds all the paper !! I 'll try to find a way not to feed the paper !! -- Come build with us! The BlackBerry® Develope

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-24 Thread Doriano Blengino
Vassilis K ha scritto: > It is a typogriphic error. > > I wrote it as "/dev/lp1" > Every file in unix has permissions you can change with chmod: chmod a+w /dev/lp1 (ran as user root). It will give everyone permission to use /dev/lp1. Or, you can check/change only the permission for the gr

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-24 Thread Vassilis K
It is a typogriphic error. I wrote it as "/dev/lp1" -- Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take Bl

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-24 Thread Demosthenes Koptsis
On Thu, Sep 24, 2009 at 2:12 PM, Vassilis K wrote: > Thank you all for your help. > > I have tried the following printing SUB: > > PUBLIC SUB bEktiposi_Click() >        DIM hPrinter AS Printer >        DIM hFile AS File >        hPrinter = OPEN "dev/lp1" FOR OUTPUT >        hPrinter.EndOfLine = gb

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-24 Thread Ron
You forgot the slash before dev/lp1 or is that a typo? So hPrinter = OPEN "dev/lp1" FOR OUTPUT Gets hPrinter = OPEN "/dev/lp1" FOR OUTPUT Regards, Ron_2nd. > Thank you all for your help. > > I have tried the following printing SUB: > > PUBLIC SUB bEktiposi_Click() > DIM hPrinter AS Pri

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-24 Thread Vassilis K
Thank you all for your help. I have tried the following printing SUB: PUBLIC SUB bEktiposi_Click() DIM hPrinter AS Printer DIM hFile AS File hPrinter = OPEN "dev/lp1" FOR OUTPUT hPrinter.EndOfLine = gb.Windows PRINT #hFile, "test a line: "; CLOSE hP

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-24 Thread Stefano Palmeri
Il giovedì 24 settembre 2009 12:10:50 Doriano Blengino ha scritto: > Demosthenes Koptsis ha scritto: > > in shell you can do it by > > > > echo "Program started" >> /var/log/messages > > > > note* >> means redirection to the end of file, so it is append > > > > if you type > you will erase the cont

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-24 Thread Doriano Blengino
Demosthenes Koptsis ha scritto: > in shell you can do it by > > echo "Program started" >> /var/log/messages > > note* >> means redirection to the end of file, so it is append > > if you type > you will erase the contents of the file and put only > "Program started" > > now you can use this command

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-24 Thread Demosthenes Koptsis
in shell you can do it by echo "Program started" >> /var/log/messages note* >> means redirection to the end of file, so it is append if you type > you will erase the contents of the file and put only "Program started" now you can use this command with SHELL. On Thu, Sep 24, 2009 at 10:41 AM, D

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-24 Thread Doriano Blengino
Benoît Minisini ha scritto: >> these are shell commands, cat and echo >> cat shows the contents of a file and echo print a string in screen >> we use redirection which is > >> to a device printer /dev/lp0 or lp1 or lp2 see what is your printer >> >> To print a file you can write in shell or in gamb

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-23 Thread Benoît Minisini
> these are shell commands, cat and echo > cat shows the contents of a file and echo print a string in screen > we use redirection which is > > to a device printer /dev/lp0 or lp1 or lp2 see what is your printer > > To print a file you can write in shell or in gambas SHELL command the > command c

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-23 Thread Demosthenes Koptsis
these are shell commands, cat and echo cat shows the contents of a file and echo print a string in screen we use redirection which is > to a device printer /dev/lp0 or lp1 or lp2 see what is your printer To print a file you can write in shell or in gambas SHELL command the command cat file > /dev/

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-23 Thread Lee McPherson
Doriano Blengino wrote: > Lee McPherson ha scritto: > >> One alternative is to use the program parashell >> >> Software: http://parashell.sourceforge.net/ >> >> Docs: http://parashell.sourceforge.net/docs/parallel.txt >> >> Apparently, all you need to do is send it byte commands. (and you need

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-23 Thread Doriano Blengino
Lee McPherson ha scritto: > One alternative is to use the program parashell > > Software: http://parashell.sourceforge.net/ > > Docs: http://parashell.sourceforge.net/docs/parallel.txt > > Apparently, all you need to do is send it byte commands. (and you need > root access) I bet that would be

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-23 Thread Lee McPherson
One alternative is to use the program parashell Software: http://parashell.sourceforge.net/ Docs: http://parashell.sourceforge.net/docs/parallel.txt Apparently, all you need to do is send it byte commands. (and you need root access) I bet that would be much easier if it works as advertised.

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-23 Thread Doriano Blengino
Vassilis K ha scritto: > Actually it is a serial matrix impact printer (panasonic KX-P1150) with a 9 > pins head and parallel port (LTP) > Just because the printer is like this, you *don't* need to use a SHELL. It can be simpler, however. The device /dev/lp0 is what the name says: "Line Printe

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-23 Thread Vassilis K
I do not understand how exactly to use : cat file > /dev/lp0 or echo "test" > /dev/lp0 Could you be more specific? Ευχαριστώ Δημοσθένη! Thanks Demosthenis! -- Come build with us! The BlackBerry® Developer Conference in

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-23 Thread Demosthenes Koptsis
try also cat file > /dev/lp0 or echo "test" > /dev/lp0 did i help you? On Wed, Sep 23, 2009 at 5:54 PM, Vassilis K wrote: > Actually it is a serial matrix impact printer (panasonic KX-P1150) with a 9 > pins head and parallel port (LTP) > So I think it is only possible to print with Shell comm

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-23 Thread Vassilis K
Actually it is a serial matrix impact printer (panasonic KX-P1150) with a 9 pins head and parallel port (LTP) So I think it is only possible to print with Shell command like SHELL lp -d ltp2 printfile.ps I only need an example for this action. If somebody has done it before it would be nice to

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-23 Thread Doriano Blengino
Vassilis K ha scritto: > I have an 9 pins printer for this job. > > If I understood well I have to make a file with the line that I want to print > then I shall use the SHELL command to send it directly to the printer lp1: > > SHELL lp -d lpt2 printfile.ps > > I need a small example to get it to wo

[Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-23 Thread Vassilis K
I have an 9 pins printer for this job. If I understood well I have to make a file with the line that I want to print then I shall use the SHELL command to send it directly to the printer lp1: SHELL lp -d lpt2 printfile.ps I need a small example to get it to work. I also need the printer to feed

Re: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-22 Thread Benoît Minisini
> Hello, > > I want to print one line each time in order to keep the entrance book of a > little hotel. > I want to print one line each time. > How can I do it? > With SHELL command it can only print files. > I have tried: > > SHELL "lp1 tEpitheto.Text" WAIT > > (where tEpitheto.Text is the text

[Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

2009-09-22 Thread Vassilis K
Hello, I want to print one line each time in order to keep the entrance book of a little hotel. I want to print one line each time. How can I do it? With SHELL command it can only print files. I have tried: SHELL "lp1 tEpitheto.Text" WAIT (where tEpitheto.Text is the text I want to print) but