DankeronisPalace Posted June 20, 2019 Share Posted June 20, 2019 Hi, new to Autoit and I would like to ask for some help from the experienced users here. I would like to read a text file with various number data line by line, and iterate through the values one by one pressing keyboard combinations based on the input given. Could somebody give me any hints on how I could do this? Link to comment Share on other sites More sharing options...
DankeronisPalace Posted June 20, 2019 Author Share Posted June 20, 2019 What I mean is I would like to do one operation for each value separated by a space... Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 20, 2019 Moderators Share Posted June 20, 2019 @DankeronisPalace welcome to the forum. To begin, look at FileRead and FileReadToArray in the help file. Both have great examples you should be able to modify to your needs. DankeronisPalace 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
DankeronisPalace Posted June 20, 2019 Author Share Posted June 20, 2019 Thank you, I'll look into it! Link to comment Share on other sites More sharing options...
Subz Posted June 20, 2019 Share Posted June 20, 2019 Untested but something like: Local $aFileLine, $aFileLines = FileReadToArray("<FilePath>") Local $iLineCount = @extended If @error Then Exit For $i = 0 To $iLineCount $aFileLine = StringSplit(StringStripWS($aFileLines[$i], 4), " ") If @error Then ContinueLoop For $j = 1 To $aFileLine[0] ;~ Do whatever for each number in the array Next Next DankeronisPalace 1 Link to comment Share on other sites More sharing options...
DankeronisPalace Posted June 20, 2019 Author Share Posted June 20, 2019 2 minutes ago, Subz said: Untested but something like: Local $aFileLine, $aFileLines = FileReadToArray("<FilePath>") Local $iLineCount = @extended If @error Then Exit For $i = 0 To $iLineCount $aFileLine = StringSplit(StringStripWS($aFileLines[$i], 4), " ") If @error Then ContinueLoop For $j = 1 To $aFileLine[0] ;~ Do whatever for each number in the array Next Next Thank you very much! I'll test it and make the appropriate changes to get it to work. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 21, 2019 Moderators Share Posted June 21, 2019 (edited) @DankeronisPalace if you have questions moving forward please ask, and post your code. Though you wouldn't always know it, we try to encourage people learning and asking questions rather than being spoon-fed code. Edited June 21, 2019 by JLogan3o13 DankeronisPalace 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
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