Espero ter ajudado.
Ola
Centureiros
Andreia, caso queira fazer uma leitura do conteudo, neste caso digamos
ler o arquivo
de remessa para processar impressão ou mesmo imprimir TEF, CUPOM NÃO
VINCULADO
Faça
!!CB!! 114
Pushbutton: pbAbreArquivo
Class Child Ref Key:
0
Class ChildKey: 0
Class:
Property
Template:
Class DLL Name:
Title:
Window Location
and Size
Left:
4.183"
Top:
2.952"
Width: 0.35"
Width Editable?
Yes
Height: 0.25"
Height Editable?
Yes
Visible? Yes
Keyboard Accelerator: (none)
Font
Name: Default
Font Size: Default
Font Enhancement:
Default
Picture File Name: C:\Centura\address.bmp
Picture
Transparent Color: None
Image Style: Single
Text Color:
Default
Background Color: Default
Message
Actions
On SAM_Click
Set sPegaTipo =
'*.txt'
Set saFileFilters[0] =
'Remessa'
Set saFileFilters[1] =
'*.txt'
Set saFileFilters[2] =
'Todos'
Set saFileFilters[3] =
'*.*'
Set nPrint = 1
Call
SalFileGetCurrentDirectory( sArquivo )
If SalDlgOpenFile(
hWndForm, 'Remessa para impressão' , saFileFilters, 4, nPrint, dfAquivo,
sArquivo )
! Crie um Data Field com esse nome
Set dfAquivo = sArquivo
!!CB!! 114
Data Field: dfAquivo
Class Child Ref Key:
0
Class ChildKey: 0
Class:
Property
Template:
Class DLL Name:
Data
Maximum Data
Length: Default
Data Type: String
Editable?
Yes
Display Settings
Window Location and
Size
Left:
0.283"
Top:
2.952"
Width: 3.85"
Width
Editable? Yes
Height: 0.25"
Height
Editable? Yes
Visible? Yes
Border?
Yes
Justify: Left
Format:
Unformatted
Country: Default
Font Name:
Default
Font Size: Default
Font Enhancement:
Default
Text Color: Default
Background Color:
Default
Input Mask: Unformatted
Message
Actions
!!CB!! 114
Pushbutton: pbImprimir
Class Child Ref Key:
0
Class ChildKey: 0
Class:
Property
Template:
Class DLL Name:
Title: Inicia
Window
Location and Size
Left:
4.633"
Top:
2.917"
Width: 1.2"
Width Editable?
Yes
Height: 0.298"
Height Editable?
Yes
Visible? Yes
Keyboard Accelerator: (none)
Font
Name: Default
Font Size: Default
Font Enhancement:
Default
Picture File Name:
Picture Transparent Color:
None
Image Style: Single
Text Color:
Default
Background Color: Default
Message
Actions
On SAM_Click
If SalFileOpen(
hFile, dfAquivo, OF_Read )
Call SalFileOpen( hFileLPT1, 'LPT1',
OF_Write )
! Tamanho da Linha Texto é de 252
Caracteres
While SalFileRead( hFile, sBuffer, 252 ) > 1
if SalStrMidX( sBuffer, 0, 1) = 'T'
Call SalFilePutStr( hFileLPT1, 'Imprime algo diferente' )
Call SalFilePutStr( hFileLPT1, sBuffer )
Call
SalFileClose( hFile )
Call
SalFileClose( hFileLPT1 )