Jos haluat muuttaa ruutukaappaukset automaattisesti PNG muotoisiksi ja lisätä niihin ikonit, niin tässä lyhyt scripti hoitamaan asia. Talleta scripti nimellä ~/Library/Scripts/Folder\ Action\ Scripts/Convert\ Screenshots\ to\ PNG.scpt
Koodi: Valitse kaikki
on adding folder items to this_folder after receiving these_items
try
repeat with i from 1 to number of items in these_items
set this_item to item i of these_items
set the item_info to the info for this_item
set the prefix to (text 1 thru 7 of the displayed name of item_info)
if ((alias of the item_info is false and the file type of the item_info is equal to "PDF" ) or (the name extension of the item_info is equal to "pdf" )) and prefix is equal to "Picture" then
set the this_path to the quoted form of the POSIX path of this_item
set the new_path to (text 1 thru -6 of the this_path) & ".png'"
do shell script "sleep 2 ; sips -s format png " & this_path & " --out " & new_path & ";sips -i " & new_path
end if
end repeat
on error error_message number error_number
if the error_number is not -128 then
tell application "Finder"
activate
display dialog error_message buttons {"Cancel"} default button 1 giving up after 120
end tell
end if
end try
end adding folder items to
Avot - nyt ruutukaappaukset konvertoituvat automaagisesti PNG:si.