我正在嘗試製作一個腳本,它將拍攝屏幕截圖,將圖像保存到桌面並將其命名爲日期。類似於如果我使用cmd + shift + 3會發生什麼情況。唯一的問題是圖像的名稱只是「屏幕」而不是我指定的全名。有人知道怎麼修這個東西嗎?以當前時間拍攝屏幕截圖並保存爲桌面名稱
on run
set theDesktop to POSIX path of (path to desktop as string)
set theCurrentDate to current date
set shellCommand to "/usr/sbin/screencapture " & theDesktop & "Screen Shot" & theCurrentDate & ".png"
do shell script shellCommand
end run
我剛剛做了一個非常相似的腳本。我沒有爲「screencapture」提供完整的路徑名稱,它工作得很好。 –