【发布时间】:2017-09-10 13:31:00
【问题描述】:
我有一个包含一些文本的文件。我能够将此文本读入变量。我想使用keystroke 命令将此文本发送到应用程序。当包含keystroke 的行运行时,它会生成一个对话框,其中包含错误“语法错误 - 无法获得击键“..文件内容..”'
on run {input, parameters}
set inputfile to "/path/to/textfile.txt"
set fileText to read inputfile
keystroke fileText
end run
如何将文件内容作为击键发送?
【问题讨论】:
标签: applescript