I made a script based on this thread: https://autohotkey.com/board/topic/80517-ahk-to-read-a-text-file-copy-first-linepaste-and-loop/
The idea is to read a txt file line by line, get the ID number in each line and create a pseudo array for each line.
After that if I open a blank document and hit the hotkey it will append each ID number to the end of c:\myfile\parent\
Code: Select all
#UseHook On
^!u::
setkeydelay , -1
Loop, Read, C:\Users\JK\Documents\AHK scripts\id.txt
IDArr%A_Index% := A_LoopReadLine
return
where I am stuck
To recall the id number in a blank document, I have to type the code below into the script and adjust depending on the line number in red:
send c:\myfile\parent\%IDArr1%
send c:\myfile\parent\%IDArr2%
e.t.c.
I dont want to have to do this for 100 lines.
Is there a way to loop automatically send
c:\myfile\parent\%IDArr1%,
c:\myfile\parent\%IDArr2%,
c:\myfile\parent\%IDArr3%,
e.t.c.
while also ignoring blank/empty lines?
Cheers for the help guys
JK