【发布时间】:2015-05-23 07:42:25
【问题描述】:
我想制作一个读取文本文件的applescript,并将每一行的文本复制到剪贴板(我已经从这里排序),然后再移动到下一行并将其复制到剪贴板.谢谢!
【问题讨论】:
标签: applescript
我想制作一个读取文本文件的applescript,并将每一行的文本复制到剪贴板(我已经从这里排序),然后再移动到下一行并将其复制到剪贴板.谢谢!
【问题讨论】:
标签: 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
【讨论】: