Jump to content

List = variables?


Marius
 Share

Recommended Posts

If it is a file where each line is an entry you could do this:

Dim $X
$File = FileOpen("File.txt", 1)
While 1
    $X = $X + 1
    $Line = FileReadLine($File, $X)
    If @error = -1 Then ExitLoop
    Assign("Proc" & $X, $Line)
WEnd
FileClose($File)

If File.txt looked like this:

Notepad.exe
MsPaint.exe
Cmd.exe

Then

$Proc1 would equal "Notepad.exe"

and $Proc2 would equal "MsPaint.exe"

and $Proc3 would equal "Cmd.exe".

All without the quotes.

PS- Next time you should post in the regular support forum unless it is a GUI related question.

PS2 (not Sony PS2 Or IBM PS/2 :) )- Didn't get to see your script but maybe an array would work Better for what what you are doing.

Edited by SolidSnake
HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...