Virgilio1 Posted September 24, 2011 Posted September 24, 2011 (edited) Hi, I have a script in a global multi-dimensional array that every interaction has to be reset. use this code in the while loop: expandcollapse popupGlobal $retDati[1][1] Global $DatiStampa [1][6] Global $ListView1 func StartLoad() Dim $riga[5] Dim $Conta = 1 $cartella = @ScriptDir $search = FileFindFirstFile($cartella & "\*.xml") _GUICtrlListView_DeleteAllItems($ListView1) While 1 $file = FileFindNextFile($search) If @error Then ExitLoop $riga = LoadDati($cartella, $file) ; Load Data from XML file if $conta > 1 then ; append new empty row Redim $retDati[Ubound($retDati)+1][1] Redim $DatiStampa[Ubound($retDati)+1][6] else ;clear the array Redim $retDati [1][1] Redim $DatiStampa [1][6] EndIf $conta += 1 LoadArrayGlobale($riga) ; append the Data to global array WEnd FileClose($search) _GUICtrlListView_AddArray($ListView1, $retDati) GUISetState(@SW_SHOW) EndFunc Func LoadArrayGlobale($riga) $retDati[Ubound($retDati)-1][0] = $riga[$CRagioneSociale] $DatiStampa[Ubound($retDati)-1][$CRagioneSociale] = $riga[$CRagioneSociale] $DatiStampa[Ubound($retDati)-1][$CIndirizzo] = $riga[$CIndirizzo] $DatiStampa[Ubound($retDati)-1][$CCodiceFiscale] = $riga[$CCodiceFiscale] $DatiStampa[Ubound($retDati)-1][$CDataIncarico] = $riga[$CDataIncarico] $DatiStampa[Ubound($retDati)-1][$CAmminstratore] = $riga[$CAmminstratore] $DatiStampa[ubound($retDati)-1][$CCaricaAmministratore] = $riga[$CCaricaAmministratore] EndFunc But it does not work as I thought, in fact I ended with an array of multiple lines due to (n * x line interactions) Edited September 24, 2011 by Virgilio1
JohnOne Posted September 25, 2011 Posted September 25, 2011 But it does not work as I thought, It might be better if you gave your location, makes it easier for people for people to focus their mind reading waves in your general direction. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now