Skip to content

Instantly share code, notes, and snippets.

@m0pfin
Created May 14, 2020 00:11
Show Gist options
  • Save m0pfin/998a01e6f802fea5e30517b3575294ac to your computer and use it in GitHub Desktop.
Save m0pfin/998a01e6f802fea5e30517b3575294ac to your computer and use it in GitHub Desktop.
AppleScript - читаем файл построчно и копируем в буффер обмена
# 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