print Qbasic output by BubbleJet printer

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
xcskier
Coder
Posts: 10
Joined: Thu Mar 10, 2005 1:34 pm

print Qbasic output by BubbleJet printer

Post by xcskier » Thu Jan 19, 2006 4:50 pm

I just got a new Canon iP4000 BJ printer....and can't print from Qbasic anymore. Canon support tells me it's because their (and all other) new
printers don't recognize DOS print manager.

My guess is that there must be a Windows version of Qbasic which would drive the printer. Any suggestions?

MystikShadows
Veteran
Posts: 703
Joined: Sun Nov 14, 2004 7:36 am
Contact:

Post by MystikShadows » Thu Jan 19, 2006 5:24 pm

my first guess is on your printer driver options, you should have something there (going to your printers then going to your canon printer properties. to not use printer spooling (print directly through the port) i believe it's called. make sure that option is set, then try to print again.
When God created light, so too was born, the first Shadow!

MystikShadows

Need hosting? http://www.jc-hosting.net

Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com

User avatar
Deleter
Veteran
Posts: 119
Joined: Sat May 07, 2005 7:31 pm

Post by Deleter » Thu Jan 19, 2006 6:52 pm

windows version of qbasic = freebasic
:lol:

User avatar
Zim
Veteran
Posts: 98
Joined: Mon Dec 05, 2005 4:31 pm
Location: Wisconsin, USA
Contact:

NotePad?

Post by Zim » Fri Jan 20, 2006 12:48 pm

You can still open the file in NotePad and print it from Windows.
--- Zim ---
--- Time flies like an arrow, but fruit flies like a banana ---

xcskier
Coder
Posts: 10
Joined: Thu Mar 10, 2005 1:34 pm

Qbasic printing

Post by xcskier » Fri Jan 20, 2006 8:48 pm

No I can't print it from NotePad, it's a random file.

When I went to Pete's homepage and clicked on "freebasic" under "Learn Qbasic", the page says "coming soon".

Can anyone tell me where/how to get freebasic?

User avatar
The Awakened
Veteran
Posts: 144
Joined: Sun Aug 07, 2005 1:51 am

Post by The Awakened » Fri Jan 20, 2006 9:27 pm

How about a Google search for Freebasic? :D

www.freebasic.net is where you want to go.
"Sorry for beating you up with a baseball bat Julian, but I DID think that you were a samsquanch."

xcskier
Coder
Posts: 10
Joined: Thu Mar 10, 2005 1:34 pm

Qbasic and printers

Post by xcskier » Mon Jan 23, 2006 6:28 pm

I tried setting my print manager to "generic/text....write to disk", then to open and print the print file from a word processor. No files are written using the print command in Qbasic.

Yes, I could have googled on Freebasic....as I could have done for my previous questions. So why register and post to this bulletin board?

So the general question now is, how do you folks print from Qbasic? Do I need some later version of Qbasic?

User avatar
The Awakened
Veteran
Posts: 144
Joined: Sun Aug 07, 2005 1:51 am

Post by The Awakened » Mon Jan 23, 2006 9:36 pm

You use FreeBasic and the Windows API. Or you change your own program so that it sends something down a port or something else, which a Windows program (which you've gotta write, and no, QB doesn't make Windows programs) intercepts and then uses the Windows API to print. Kind of like DS4QB. And then you run into problems if you're running anything other than Windows 95 or 98.

QB was only made for DOS.
"Sorry for beating you up with a baseball bat Julian, but I DID think that you were a samsquanch."

User avatar
Patz QuickBASIC Creations
Veteran
Posts: 399
Joined: Wed Mar 02, 2005 9:01 pm
Location: Nashville, Tennessee
Contact:

Post by Patz QuickBASIC Creations » Tue Jan 24, 2006 3:06 pm

Someone *wink wink* should make a DOS driver making this possible (prining on newer printers on QB). It would save us necromancers some trouble.
(necromancers -> raising the dead)
(dead -> QuickBASIC) :roll:

xcskier
Coder
Posts: 10
Joined: Thu Mar 10, 2005 1:34 pm

Qbasic consultants?

Post by xcskier » Tue Jan 24, 2006 3:54 pm

The Awakened: yeah, that's what I hoped to try to do when I set the Windows print manager to "write to file". I don't know why it didn't work, but whatever...

Thanks to all. At this point I'm going to take the floppy to a local PC consultant, who says "no charge if I can't recover the data". If he can't do it, can anyone recommend some other consulting company I could try?
The local is not a Qbasic expert, he's just generally familiar with it.

moneo
Veteran
Posts: 451
Joined: Tue Jun 28, 2005 7:00 pm
Location: Mexico City, Mexico

Post by moneo » Tue Jan 24, 2006 8:51 pm

Xcskier,

I'm gonna try to help you.

1) Post the original QB program of yours where you were trying to print the file to the BubbleJet. I need this to see what data you were trying to print.

2) You later said that the file was a random file. If the file is not larger than 1MB, email me the file to:
moneo@prodigy.net.mx

3) I'll convert the file to a text file and mail it back, so that you can open it in Notepad and print from there to your BubbleJet.

Will that solve your problem?

BTW, the fact that QBasic can't print directly to your BubbleJet is not a problem of QBasic nor the printer. It's a problem of newer versions of Windows like NT and XP.
For the same reason, you can't access any USB devices from QBasic either. When QBasic was developed these devices did not exist and QBasic has not been upgraded for years and is in fact obsolete.
*****
If you are ahead of me, lead.
If you are behind me, follow.
If you are not doing anything,
Get out of the way.

xcskier
Coder
Posts: 10
Joined: Thu Mar 10, 2005 1:34 pm

help printing Qbasic file

Post by xcskier » Sat Jan 28, 2006 1:58 pm

Moneo: thanks for the offer. I was waiting to get a result from the local computer consultant before replying.

The consultant, I believe, tried the same thing you are offering: the Qbasic datafile is compiled and he ran it through some kind of interpreter or text editor, to interpret it. But what came out needs further interpretation: the Qbasic file opens as hieroglyphics before interpreting, he was able to get a table of letters but which still aren't intelligible.

He said if I could tell him the format of the records, he might be able to write a short program that would provide further decoding. I did tell him the format, but he's not been able to achieve further success.

Do you still want to try?

moneo
Veteran
Posts: 451
Joined: Tue Jun 28, 2005 7:00 pm
Location: Mexico City, Mexico

Re: help printing Qbasic file

Post by moneo » Sat Jan 28, 2006 2:24 pm

xcskier wrote:Moneo: thanks for the offer. I was waiting to get a result from the local computer consultant before replying.

The consultant, I believe, tried the same thing you are offering: the Qbasic datafile is compiled and he ran it through some kind of interpreter or text editor, to interpret it. But what came out needs further interpretation: the Qbasic file opens as hieroglyphics before interpreting, he was able to get a table of letters but which still aren't intelligible.

He said if I could tell him the format of the records, he might be able to write a short program that would provide further decoding. I did tell him the format, but he's not been able to achieve further success.

Do you still want to try?
Yeah sure, I'll give a shot. How was the file created originally? Do you have the source code for the program that created the file?

In one of your posts you said: "it's a random file". Do you mean a QB random-type file, or do you mean some unknown file? Big difference.

Answer my questions and go ahead and email me the file.
*****

moneo
Veteran
Posts: 451
Joined: Tue Jun 28, 2005 7:00 pm
Location: Mexico City, Mexico

Post by moneo » Sun Jan 29, 2006 10:21 pm

CAVEAT EMPTOR !!!

Just had to tell you guys this story. Somebody gave our friend xcskier a really bum steer. He was given a Basic Random file containing a record description plus 8 values. Aparently he was told that he could just print these records out to his printer, hence the original printer problems of this thread.

He sent me the file so I could convert it to a text file for printing. Here's a summary of the problems I encountered with the file:
1) The format of each record was not what he was told, which I discovered with a hex editor.
2) Each 44 byte record was padded out with nulls for a total record length of 128 characters which is the default for Random when you don't specify a LEN= on the OPEN.
3) There are 172 records on the file. The first and last look like they have meaningful data values. The rest of the records have garbage exponential values.
4) By pure chance, I ran across a discussion of MBF (Microsoft Binary Format) in Ethan Winer's QuickBasic book. I recompiled my conversion program using the /MBF switch, and now got meaningful data values for all except the first and last records.

Whoever gave him this file, created it with an old version of QB or other Basic prior to QB 4.0, hence the values were in MBF. My guess is that the first and last records were updated recently using QB 4.0 or 4.5, so these were now in the current IEEE format.

I sent him the new converted file in ASCII text. Hope he can use it.

Live and learn.
*****

Post Reply