Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Printing Trouble
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Yeti_19




PostPosted: Wed Jul 19, 2006 2:54 am   Post subject: Printing Trouble

Hi
I have made this program that gives you an option to print, this works fine when running it through turing, but when I generate it as a stand alone program the print feature doesn't work.
Does anyone know how to fix this?
Thanks
Yeti
Sponsor
Sponsor
Sponsor
sponsor
Delos




PostPosted: Wed Jul 19, 2006 9:02 am   Post subject: (No subject)

Would you mind posting a snippet of your code? Seeing as there're several methods of printing, one can never really tell which one you're using.
If, for instance, you're using the 'Print' button in the buttonbar, then that will not work after compilation.
If you're printing through LPT1, then it should work just fine, unless you have some path issues.
If you're printing through a USB printer, then you're likely having similar problems to using LPT1. Again, post the code and we'll be able to help a bit more.
Yeti_19




PostPosted: Wed Jul 19, 2006 7:43 pm   Post subject: (No subject)

This is the printing procedure I used in my code. It is not this exact code but similar.
Yeti

code:
var dataout : int
put "test print"
delay (1000)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
open: dataout, "printer", put
put:dataout,"this is a test"
close: dataout
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
cls
put "this is a test"
beard0




PostPosted: Thu Jul 20, 2006 12:08 pm   Post subject: (No subject)

What happens when you run that, compiled as a standalone? Do you get an error message, or does it seem to simply ignore the command? Does it instead create a file called printer? Please give more details as to what happens.
Delos




PostPosted: Thu Jul 20, 2006 1:02 pm   Post subject: (No subject)

Heh. I was just about to ask if anyone had seen you around, seeing as that is your code being used! Well Yeti_19, you're in very capable hands with beard0.
beard0




PostPosted: Thu Jul 20, 2006 3:50 pm   Post subject: (No subject)

Thanks for the vote of confidance Delos. I've been somewhat busy in the last while, but plan to be making regular appearances on the site again.
Yeti_19




PostPosted: Wed Jul 26, 2006 10:51 am   Post subject: (No subject)

It just ignores it completely as if it is not there at all
beard0




PostPosted: Wed Jul 26, 2006 5:25 pm   Post subject: (No subject)

Depending on what you are doing, I would suggest getting your hands on a copy of the old tcomp.exe DOS compiler, which will compile your program as a DOS app. This will work as long as you're not using any of the newer commands. I've had trouble with the windows compilers before - something else that it does not do correctly is to allow compiled programs to read in command line arguments. I know however that the old DOS version did, and so hope that it will work for printing as well.

Let us know if this works out; here's hoping it does.
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 8 Posts ]
Jump to:   


Style:  
Search: