Hi !
First excuse me for my english :">
I've some problems with the assign function. I want import data from sections of my ini file (5 lines by sections : dir, file, name, process, run). This part of code returns good values in the message box.
But if i want to use my variables created by the import function after the importation, variables are empty... (for exemple try to display the message box again after "next")
CODEFor $n = 1 to $nbfiles
import()
next
Func import()
$var = IniReadSection($ini, $n)
For $i = 1 To $var[0][0]
If $var[$i][0] == "dir" Then
Assign("dir" & $n, $var[$i][1])
ElseIf $var[$i][0] == "file" Then
Assign("file" & $n, $var[$i][1])
ElseIf $var[$i][0] == "name" Then
Assign("name" & $n, $var[$i][1])
ElseIf $var[$i][0] == "process" Then
Assign("process" & $n, $var[$i][1])
ElseIf $var[$i][0] == "run" Then
Assign("run" & $n, $var[$i][1])
EndIf
Next
MsgBox (4096, "IMPORT", "dir : " & Eval("dir" & $n) & " file : " & Eval("file" & $n) & " name: " & Eval("name" & $n) & " process : " & Eval("process" & $n) & " run : " & Eval("run" & $n))
EndFunc
The aim is to create dir1, dir2... file1, file2... etc and use them in another function.
thank you for helping.
TaGaDa