| View previous topic :: View next topic |
| Author |
Message |
azure
Joined: 07 Jun 2007 Posts: 694
|
Posted: Fri Apr 11, 2008 5:56 pm Post subject: first_line |
|
|
hello
here
http://www.autohotkey.com/docs/commands/LoopReadFile.htm
it says
last_line := A_LoopReadLine
can I do first_line, second_line, etc as well?
I need to read specific lines from a file and store them in variables
thanks |
|
| Back to top |
|
 |
tonne
Joined: 06 Jun 2006 Posts: 1651 Location: Denmark
|
|
| Back to top |
|
 |
Tuncay
Joined: 07 Nov 2006 Posts: 1886 Location: Germany
|
|
| Back to top |
|
 |
Rhys
Joined: 17 Apr 2007 Posts: 761 Location: Florida
|
Posted: Fri Apr 11, 2008 11:19 pm Post subject: |
|
|
If parsing or reading a file line by line, you could also do... | Code: | If (A_Index = 1)
Var1:=A_LoopField
If (A_Index = 3)
Var3:=A_LoopField
If (A_Index = 4)
Var4:=A_LoopField
If (A_Index = 231)
Var231:=A_LoopField
| Etc... _________________ [Join IRC!]
 |
|
| Back to top |
|
 |
trik
Joined: 15 Jul 2007 Posts: 1320
|
Posted: Sat Apr 12, 2008 3:28 am Post subject: |
|
|
Or..
| Code: | FileRead, Con, File.txt
Loop, Parse, Con, `n
{
FileReadLine, Line, File.txt, %A_Index%
Var%A_Index% := A_LoopField
} |
|
|
| Back to top |
|
 |
|