
29/12/2009, 11:19
|
 | | | Fecha de Ingreso: septiembre-2009
Mensajes: 502
Antigüedad: 15 años, 7 meses Puntos: 47 | |
Respuesta: Contador de Páginas Hola!!
A ver... una forma seria asi:
1) OBTENEMOS EL TOTAL DE LINEAS
dim Total as integer, CONT as integer, RutaArchivo as string, RutaArchivoConPie as string, Data
open RutaArchivo for input as #1
do while not eof(1)
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 write#2,"Pagina " & CONT & " de " & TOTAL
loop
close#1
close#2
3)ELIMINAMOS EL ARCHIVO ORIGINAL PARA SOLO TENER EL NUEVO
Kill RutaArchivo
Prueba a ver si te funciona |