evertonlb Posted May 5, 2014 Report Share Posted May 5, 2014 Pessoal... Já tenho tudo pronto no software em Clipper e queria aproveitar o código tal e qual tá funcionando.. Mas pelo jeito, e pelos testes que fiz ( o código a seguir ) não funciona! Mas como faria pra funcionar?? Se eu pudesse só no Ctrl+C, Ctrl+V me pouparia um tempo substancial... Tem um jeito de aproveitar os códigos de impressão de carnes e outras coisas que tenho e continuar imprimindo na matricial? V_cImpCod := "1232" V_cImpSeq := "6547387698" * set device to printer set printer to cPCrn setprc(0,0) * @ 00,00 say " " @ 00,00 say chr( 14 ) @ 02,19 say "empresa de teste" @ 02,45 say "segundo teste" * @ 10,06 say "0001" @ 11,14 say val(V_cImpCod) pict "99999" @ 12,20 say val(left(V_cImpSeq,8)) pict "99999999" set printer to set device to screen Quote Link to comment Share on other sites More sharing options...
kapiaba Posted May 5, 2014 Report Share Posted May 5, 2014 Tente assim: LOCAL cFile := "c:\abc\arquivo.txt" @ 00,00 say " " @ 00,00 say chr( 14 ) @ 02,19 say "empresa de teste" @ 02,45 say "segundo teste" * @ 10,06 say "0001" @ 11,14 say val(V_cImpCod) pict "99999" @ 12,20 say val(left(V_cImpSeq,8)) pict "99999999" set device to printer SET PRINTER TO (cFile) PrintFileRaw(GetDefaultPrinter(), cFile, "Teste com PrintFileRaw()") SET PRINTER TO set device to screen Quote Link to comment Share on other sites More sharing options...
kapiaba Posted May 5, 2014 Report Share Posted May 5, 2014 ou, cPrinterName := GetDefaultPrinter() ArqImp := "imp.txt" SET PRINT ON SET PRINTER TO &ArqImp SET DEVICE TO PRINTER SET CONSOLE OFF // TEXTO... SET CONSOLE ON SET PRINTER OFF SET PRINTER TO SET DEVICE TO SCREEN PrintFileRaw( cPrinterName, ArqImp, 'Teste de Impressao' ) Quote Link to comment Share on other sites More sharing options...
evertonlb Posted May 5, 2014 Author Report Share Posted May 5, 2014 Mas só com o PrintFileRaw()?? Não vai diretaço?? queria mandar direto pra porta, "quenem de antes"!.. bem moleza mesmo!! att. Everton kapiaba 1 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted May 5, 2014 Report Share Posted May 5, 2014 Pode até ser que nas máquinas + velhas, você consiga, mas nas novas, a porta LPT? foram retiradas e em seu lugar entrou a porta USB. bas, Quote Link to comment Share on other sites More sharing options...
evertonlb Posted May 5, 2014 Author Report Share Posted May 5, 2014 Pois é... mas mesmo que tenha USB eu compartilho e mandava pra LPT1... Clipper né amigo.. tem que viver de gambiarra! tenho máquinas nos clientes com 3 paralelas... Blz.. Obrigado pelas dicas.. vou testar uns códigos que peguei no forum! Att. Everton Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.