Jump to content
Sign in to follow this  

List = variables?

Recommended Posts


Ok. One more question...

I have a list. And now I need that AutoIt could set every line of list as variable $proc1 then $proc2, $proc3 and so on.

Marius back in da hood! :)

Share this post

Link to post
Share on other sites

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)

If File.txt looked like this:



$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.

Share this post

Link to post
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

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.