I'm new to this tool so please pardon my "newb" question or questions. When I first started working on this task I thought it might be best to simply open up the document in notepad and use windows keyboard commands to do this but the task requested I do it differently. Anyway, I searched the forums and I was able to get this far in my task. The request is to copy the data in this file and then parse each line. What I'm trying to do right now is loop through each line and add it to an array. I found a snippet but I'm not able to get it to work and I honestly don't even understand it.
Here is my current code:
Code: Select all
//Variables
let>FilePath=C:\Users\Micah\Downloads\Work Stuff\Macro Job\Report.txt
**BREAKPOINT**
/*Open Document
press>ctrl
press>esc
release>ctrl
release>esc
send>filename
Wait>1
press>tab
release>tab
press>enter
release>enter
*/
//Read Document
ReadFile>FilePath,Report
//Add Lines to Array
GetClipboard>report
Let>tmp0=(?m)(?<=^Line \d: ).+?$
RegEx>tmp0,report,0,M,NM,0
The section I'm trying to figure out right now is this:
Code: Select all
//Add Lines to Array
GetClipboard>report
Let>tmp0=(?m)(?<=^Line \d: ).+?$
RegEx>tmp0,report,0,M,NM,0
Just need a tut or sample on how to read a line in a text file and add it to an array. I was not able to find any thing in the documentation about this and the samples on here seem a bit crude or at least hard to follow. Does anyone have simple samples of reading a line in a text document and adding that line to an array, or video tuts those are very helpful as well. Thanks.