
30/12/2009, 08:06
|
 | | | Fecha de Ingreso: septiembre-2009
Mensajes: 502
Antigüedad: 15 años, 7 meses Puntos: 47 | |
Respuesta: Contador de Páginas je, je,je... se me pasó
1) OBTENEMOS EL TOTAL DE LINEAS
dim Total as integer, CONT as integer, RutaArchivo as string, RutaArchivoConPie as string, PAG as integer,Data PAG=0
CONT=0
open RutaArchivo for input as #1
do while not eof(1) input #1, Data
Total=Total+1
loop
close #1
Total=Total/16
if Total<1 then Total=1
2)CREAMOS UN NUEVO ARCHIVO CON LOS DATOS DEL ARCHIVO ORIGINAL
Open RutaArchivoConPie for output as #2
open RutaArchivo for input as #1
do while not eof(1)
input#1, Data
Write #2, Data
CONT=CONT+1
if CONT=16 then PAG=PAG+1
write#2,"Pagina " & PAG & " de " & TOTAL CONT=0
end if
loop
close#1
close#2
3)ELIMINAMOS EL ARCHIVO ORIGINAL PARA SOLO TENER EL NUEVO
Kill RutaArchivo
Prueba a ver si te funciona |