Post by angelo2449 on Apr 14, 2020 13:28:22 GMT -5
Hi Guys,
I wrote this code, which in another program works, here it doesn't want to work!
The problem occurs with the command> files <does not return> NumFiles <:
Even if the variable > Indi$ < is correctly valued,
> NumeroFiles < is always 0.
Help my, thank You.
I wrote this code, which in another program works, here it doesn't want to work!
The problem occurs with the command> files <does not return> NumFiles <:
dim info$(10, 10)
dim Cartelle$(30)
global Selected$
................
................
................
[Associa]
WindowWidth = 800
WindowHeight = 550
UpperLeftX = 400 ''int((DisplayWidth-WindowWidth)/2)
UpperLeftY = int((DisplayHeight-WindowHeight)/2)
BackgroundColor$ = "darkcyan"
ForegroundColor$ = "black"
ya = 0
listbox #lib.list, Riga$(), [LibList], 25, 20, 730, 410
button #lib.associasolo, "Salva solo i Calcoli", [Salva.Solo.Calcoli], UL, 25, ya + 450, 200, 40
button #lib.associatutto, "Salva Calcoli e Nome Attività ", [Salva.Tutto], UL, 250, ya + 450, 300, 40
button #lib.info, "Info", [Lib.Info], UL, 655, ya + 450, 100, 40
open "Computo metrico - Gestione delle Voci di Computo - Clicca una Voce" for window as #lib
#lib, "font courier_new 10 16 bold"
#lib, "trapclose [quit.lib]"
#lib.list, "singleclickselect"
gosub [Finestra]
Indi$ = "C:\AutocadSupporto\Voci\VociComputo\" + Selected$
files Indi$, info$()
NumeroFiles$ = info$(0,0)
print Indi$
print NumeroFiles$
for i = 1 to val(NumeroFiles$)
Riga$(i) = info$(i, 0)
Riga$(i) = left$(Riga$(i), len(Riga$(i)) - 4)
next i
#lib.list, "reload"
#lib.list, "enable"
wait
' ------------------------------
[Finestra]
WindowWidth = 470
WindowHeight = 600
UpperLeftX = 200
UpperLeftY = int((DisplayHeight-WindowHeight)/2)
BackgroundColor$ = "blue"
ForegroundColor$ = "black"
listbox #archivio.lb, Cartelle$(), [SelectFolder], 25, 20, 400, 500
open "Lista delle Categorie - Seleziona una Cartella" for window as #archivio
#archivio, "font courier_new 10 18 bold"
#archivio, "trapclose [quit.archivio]"
files "C:AutocadSupporto\Voci\VociComputo", info$()
n = val(info$(0, 0))
q = val(info$(0, 1))
redim Cartelle$(q + 1)
for i = 1 to q
Cartelle$(i + 1) = info$(n + i, 1)
next i
#archivio.lb, "singleclickselect"
#archivio.lb, "reload"
wait
' ------------------------------
[quit.archivio]
close #archivio
wait
' ------------------------------
[SelectFolder]
#archivio.lb, "selectionindex? Index"
#archivio.lb, "selection? Selected$"
close #archivio
return
Even if the variable > Indi$ < is correctly valued,
> NumeroFiles < is always 0.
Help my, thank You.