Created
May 14, 2020 00:11
-
-
Save m0pfin/998a01e6f802fea5e30517b3575294ac to your computer and use it in GitHub Desktop.
AppleScript - читаем файл построчно и копируем в буффер обмена
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment