ReadFile() { ; This starts a Function call ReadFile(). Anything With in the { } , would be process
Global
Loop , Read , C:\My Documents\file.txt ; This is the file to be read. Starts a Loop
{
If A_Index = 3 ; This reads line 3 of the file.txt
Var1 := A_LoopReadLine ; This sets Var1 of whatever is on line 3
StringTrimLeft , Var1Temp2 , Var1 , 26 ; Var1 hold the entire line and then Trims anything on the left of character 26. The new ; Variable is Var1Temp2.
StringTrimRight , Var1Temp , Var1Temp2 , 22 ; Var1Temp2 hold new info. Then, it is trim anything on the right of character 22. The ; new Variable is Var1Temp.
If A_Index = 4 ; This reads line 4 of the file.txt
Var2 := A_LoopReadLine ; This sets Var1 of whatever is on line 4
StringTrimLeft , Var2Temp2 , Var2 , 22 ; Var2 hold the entire line and then Trims anything on the left of character 22. The new ; Variable is Var2Temp2.
StringTrimRight , Var2Temp , Var2Temp2 , 29 ; Var2Temp2 hold new info. Then, it is trim anything on the right of character 29. The ; new Variable is Var2Temp.
If A_Index = 4 ; This reads line 4 of the file.txt
Var3 := A_LoopReadLine ; This sets Var3 of whatever is on line 4
StringTrimLeft , Var3Temp , Var3 , 53 ; Var2 hold the entire line and then Trims anything on the left of character 53. The new ; Variable is Var3Temp.
If A_Index = 21 ; This reads line 21 of the file.txt
Var4 := A_LoopReadLine ; This sets Var4 of whatever is on line 21
StringTrimLeft , Var4Temp2 , Var4 , 57 ; Var4 hold the entire line and then Trims anything on the left of character 57. The new ; Variable is Var4Temp2.
StringTrimRight , Var4Temp , Var4Temp2 , 12 ; Var4Temp2 hold new info. Then, it is trim anything on the right of character 12. The ; new Variable is Var4Temp.
}
Return
}
Return
; These are small Functions that helps send info whenever placing the Function somewhere.
3Var1Temp() { ; This starts a Function call 3Var1Temp(). Anything With in the { } , would be process
Global ; This sets the Variables as Global. Therefore, the variable name can't be use anywhere ; else.
SendRaw, %Var1Temp% ; SendRaw send whatever is in the Variable Var1Temp as is, including any special ; characters. Treats them as text instead of special characters.
Return
}
4Var2Temp() {
Global
SendRaw, %Var2Temp%
Return
}
4Var3() {
Global
SendRaw, %Var3Temp%
Return
}
21Var4Temp() {
Global
SendRaw, %Var4Temp%
Return
}