ok allora io da shell do:
wget link/$file.zip
cat index.html | grep $file.zip | cut -d'(' -f2 | cut -d' ' -f1
e come output ricevo la dimensione in byte
che in gambas è:
SHELL "rm -fr file.zip index.html" WAIT
SHELL "wget ftp://ftp.finanze.it/pub/file/" WAIT
SHELL "echo $( cat index.html | grep file.zip | cut -d'(' -f2 | cut -d' ' -f1)" WAIT
e ora? come la collego alla progress bar?
[postedit]ho partorito questo...
PUBLIC SUB Form_Open()
DIM stato AS Variant
DIM avanzamento AS Integer
DIM Valore AS Integer
DIM controllo AS Variant
DIM myprocess AS Process
WAIT
SHELL "ping -c 4 www.google.it" TO controllo
WAIT
IF Len(controllo) = 0 THEN
Message.Error("Non è presente la connessione", "exit")
installdocfa.Close()
END IF
IF NOT Exist(user.home &/ "Docfa") THEN
MKDIR (user.home &/ "Docfa")
END IF
SHELL "rm -fr docfa4-1.zip index.html" WAIT
SHELL "wget ftp://ftp.finanze.it/pub/docfa4/" WAIT
SHELL "echo $( cat index.html | grep docfa4-1.zip | cut -d'(' -f2 | cut -d' ' -f1)" TO avanzamento
SHELL "rm -fr index.html" WAIT
SHELL "wget ftp://ftp.finanze.it/pub/docfa4/docfa4-1.zip" WAIT
REPEAT
SHELL "ls --size | grep docfa4-1.zip | cut -d' ' -f1" TO Valore
stato = Valore / avanzamento
ProgressBar1.Value = stato
UNTIL avanzamento = Valore
END
ovviamente non funge... sicuramente errori di sintassi, ma come procedimento potrebbe andare?
come mai non mi compare la finestrella grafica?