morgun Posted January 5, 2011 Posted January 5, 2011 Hi I hope this could be good example also to append into instalation.I need script which -opens file and -for each line calls function-function takes line from its input and -call Run with input as parameter --and makes a few other things.Something like------------------FILE=Openfile(lines.txt)foreach(LINE=readln(FILE)) { functionX(LINE) } func functionX(&var) Run:\putty.exe -address var -port 23 Send(logged in!)funcend------------------var in function should be taken as string, part of RUN statementIs this possible in autoit? Thanks for your time
Zedna Posted January 5, 2011 Posted January 5, 2011 Example from helpfile #include <file.au3> Dim $aRecords If Not _FileReadToArray("error.log",$aRecords) Then MsgBox(4096,"Error", " Error reading log to Array error:" & @error) Exit EndIf For $x =1 to $aRecords[0] Msgbox(0,'Record:' & $x, $aRecords[$x]) Next Resources UDF ResourcesEx UDF AutoIt Forum Search
morgun Posted January 7, 2011 Author Posted January 7, 2011 thanks for your answer. I will probably need more help. Where is specified path to the file?
Zedna Posted January 7, 2011 Posted January 7, 2011 I will probably need more help. Where is specified path to the file?"C:\Program Files\AutoIt3\autoit3.chm" Resources UDF ResourcesEx UDF AutoIt Forum Search
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now