我需要自動執行截圖任務,所以我想爲什麼不使用automator?我找到了「採取截圖」行動,並開始玩它。問題在於,它設置了文件名,當工作流再次運行時,它會覆蓋之前的屏幕截圖。我試着選擇這個並重命名它,但它不會工作。基本上我想要的是命令+ shift + 3的正常功能,它會在日期或時間戳它或任何東西,但是會覆蓋!有任何想法嗎?Automator mac「屏幕截圖」問題
0
A
回答
1
我設法使用抓屏和日期做同樣的事情:
fdate=$(date +"$m$d$Y") #I formatted time as mmddyyyy. You can use other formats, add dashes, etc.
screencapture -iW ~/$fdate.png #outputs file at ~/mmddyyyy.png
或類似的東西。你可以把它包裝到一個shell工作流程中,或者把它放在OSX,Platypus的流行包裝中。我真的很想知道該怎麼做,因爲我從來沒有能夠理解鴨嘴獸。
0
我從@ user8259答案,並使其更像是內置的屏幕捕獲,你通常會看到:
# We'll use the default format for the time-stamp
# This could be improved to be more like the Mac's built-in
# screen-shot with yyyy-mm-dd at hh.mm.ss AM/PM
# you would just have to figure out the date-time formatting
# in this shell script.
theTime=`date`
# create the file name for the screen-shot
theFileName="$HOME/Desktop/Screenshot $theTime.png"
#outputs file on the Desktop with a timestamp
screencapture "${theFileName}"
我的代碼版本包括除了日期 - 時間標記郵票以使屏幕截圖不太可能覆蓋先前的屏幕截圖。
您可以將此代碼添加到稱爲「運行Shell腳本」操作的Automator操作,而不是使用「執行屏幕快照」操作。
這可能更適合apple.stackexchange.com – 2011-02-08 23:22:05