I'd like to make an applescript that reads a text file and for each line copies the text to the clipboard (what it does with it from here I have sorted) before moving onto the next line and copying that to the clipboard. Thanks!
# Determine the input file's path.
set srcFile to ((path to desktop) as text) & "myFile.txt"
# Read lines from file.
set lns to paragraphs of (read file srcFile as «class utf8»)
# Loop over lines read and copy each to the clipboard.
repeat with ln in lns
set the clipboard to ln
display alert (the clipboard)
end repeat
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With