我正在尝试编写一段苹果脚本来定位、复制和粘贴图像文件。
以下代码适用于jpegs
和pngs
:
set thePath to "file_location"
set the clipboard to (read thePath as «class PNGf») # [1]
tell application "System Events" to keystroke "v" using command down
当我将它改为GIF格式时,它无法工作:
set thePath to "file_location"
set the clipboard to (read thePath as GIF picture) # [1]
tell application "System Events" to keystroke "v" using command down
相反,它捕获GIF
的第一帧,而不是整个文件。
有人知道这里出了什么问题吗?