| View previous topic :: View next topic |
| Author |
Message |
azure
Joined: 07 Jun 2007 Posts: 297
|
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: 1259 Location: Denmark
|
Posted: Fri Apr 11, 2008 6:00 pm Post subject: |
|
|
FileReadLine? _________________ there's a dog barking close within the range of my ear
sounds like he wants to escape the chain
he would probably bite me to death if he could
but the chain lets me spit in his face
- Kashmir |
|
| Back to top |
|
 |
Tuncay
Joined: 07 Nov 2006 Posts: 383 Location: Berlin
|
|
| Back to top |
|
 |
Rhys
Joined: 17 Apr 2007 Posts: 736 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!]
http://www.codeforcure.org/ |
|
| Back to top |
|
 |
Trikster
Joined: 15 Jul 2007 Posts: 1224 Location: Enterprise, Alabama
|
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 |
|
 |
|