Jag har gjort en liten snabb anpassning och utökning av ett script jag publicerat tidigare här i denna tråd:
http://www.99.se/utveckling/214798-applescript-f-r-att-ppna-allt-i-detta-f-nster-i-finder.html
Detta är en ny version som gör vad du vill.
Hittade inte något bra sätt att visa kommentarerna i ett Finderfönster om de redan inte är visade, slå kommando J för att ställa in så att de syns.
Läs kommentaren, speciellt den om att detta script skall spara som program och ikonen för programmet skall dras till verktygsraden i finder.
Jag har också en instruktion för hur du gör just det, sparar ett script som ett program och drar det till verktygsraden i ett Finderfönstret. Notera den svenska flaggan:
Applescript-tips från Intelligent Mammals AB - Open everything in this window
(*
----------------------------------------------------------------
Open everything in this window
----------------------------------------------------------------
© Intelligent Mammals AB, Ola Andersson, 2008-07-20
[email protected]!
http://www.intelligentmammals.se/
What is it?
----------------------------------------------------------------
This script will set the comments of selected or all items in the frontmost window in the Finder to today.
Save it as an application, and then drag it to the toolbar in any Finder-window, and you have a one-click way to open all items in the current Finder window.
*)
on run
tell application "Finder"
-- Ask the user first if he happened to hit the button in the wrong folder:
display dialog "Change comment of files?" buttons {"All!", "Selected!", "Cancel"} default button 1 cancel button 3 giving up after 5
-- Check the answer, and do all the rest only if the user did not cancel.
if button returned of the result = "All!" or button returned of the result = "Selected!" or gave up of the result is true then
if button returned of the result = "All!" then
set whichFiles to "All"
else
set whichFiles to "Selected"
end if
-- Get a reference to the folder of the frontmost window in Finder
set picfolder to folder of window 1
-- Get all items in the folder
try
if whichFiles = "All" then
set fileList to get every file of picfolder -- whose name extension is "eps"
else
set fileList to selection
end if
on error
set fileList to {}
end try
-- Get the date in nice swedish form
set y to year of (current date)
set m to month of (current date)
set d to day of (current date)
set longnumberAsString to (y * 10000 + m * 100 + d) as string
set nicedate to text 1 thru 4 of longnumberAsString & "-" & text 5 thru 6 of longnumberAsString & "-" & text 7 thru 8 of longnumberAsString
--> "2008-07-20"
-- Loop through them and set the comment to todays date
repeat with afile in fileList
try
set comment of afile to nicedate
on error
set label index of afile to 1 -- Orange
end try
end repeat
end if
end tell
end run