Daniel Halon Posted January 28, 2021 Report Share Posted January 28, 2021 Olá a todos, preciso uma ajuda de algo muito simples , porem não estou conseguindo, vou postar um exemplo Utilizo o Notepad.exe por exemplo, o pedido 000014(campo numérico) cDir := 'pedidos\' + Strzero(p_pedido,6,0) // para salvar na pasta pedidos, até agora tenho 'pedidos\000014' cFile := cDir + IF (NEWPAR->HAB_IMPRE == .T.,'.PRN', '.TXT') // aqui adiciono a extensão WinExec("EditPad cFile") // abre e não mostra o conteúdo Porem se digito WinExec("EditPad 000014.PRN") ABRE NORMAL O que estou fazendo errado? Obrigado... Quote Link to comment Share on other sites More sharing options...
lucimauromelo Posted January 29, 2021 Report Share Posted January 29, 2021 Boa noite Um Memoedit não resolve? Quote Link to comment Share on other sites More sharing options...
Eric.Developer Posted January 29, 2021 Report Share Posted January 29, 2021 Olá, Você não passou como variável, o correto é: WinExec("EditPad " + cFile) [],https://devclub.idlagam.com/ 3 horas atrás, Daniel Halon disse: Utilizo o Notepad.exe por exemplo, o pedido 000014(campo numérico) cDir := 'pedidos\' + Strzero(p_pedido,6,0) // para salvar na pasta pedidos, até agora tenho 'pedidos\000014' cFile := cDir + IF (NEWPAR->HAB_IMPRE == .T.,'.PRN', '.TXT') // aqui adiciono a extensão WinExec("EditPad cFile") // abre e não mostra o conteúdo Porem se digito WinExec("EditPad 000014.PRN") ABRE NORMAL Quote Link to comment Share on other sites More sharing options...
Daniel Halon Posted January 29, 2021 Author Report Share Posted January 29, 2021 Obrigado, vou testar Quote Link to comment Share on other sites More sharing options...
Daniel Halon Posted February 7, 2021 Author Report Share Posted February 7, 2021 Não funcionou, passei assim, como variavel, mas continuo com o mesmo problema Quote Link to comment Share on other sites More sharing options...
kapiaba Posted February 7, 2021 Report Share Posted February 7, 2021 cFile := cFilePath( GetModuleFileName( GetInstance() ) ) + Strzero(p_pedido,6,0) + ".TXT" ? cFile WinExec( "Notepad.exe " + cFile ) Quote Link to comment Share on other sites More sharing options...
Daniel Halon Posted February 8, 2021 Author Report Share Posted February 8, 2021 Obrigado Kapi, vou tentar Quote Link to comment Share on other sites More sharing options...
Daniel Halon Posted February 12, 2021 Author Report Share Posted February 12, 2021 Deu certo Kapi, Gracias ou obrigado 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.