Per chiudere tutti Finder windows contemporaneamente, premi il tasto Opzione mentre fai clic sul menu File in < strong> Finder e seleziona Chiudi tutto o premi solo Opzione - Comando - W .
A proposito, per ottenere Informazioni di riepilogo per più file / cartelle in Finder , seleziona i file di destinazione / cartelle e quindi Controllo fai clic e seleziona Ottieni informazioni riassuntive . Allora hai solo un Ottieni informazioni foglio aperto e puoi premere Comando - W per chiuderlo.
Per chiudere solo quelli di Ottieni informazioni utilizza questo AppleScript , di James Stout .
tell application "Finder"
set theWindowList to windows (* get all Finder windows *)
repeat with i from 1 to number of items in theWindowList (* loop through them *)
set shouldClose to false (* reset to false *)
set this_item to item i of theWindowList (* get a window from the list *)
set windowName to name of this_item (* get the window'ss name *)
(* this list should contain class property that tells you the type of window - which is nice *)
(* Class would be either "Finder window" for normal windows or "information window" for the Info windows *)
(* However, it doesn't contain the class property. alas. *)
(* So to differentiate, we can use the current view/panel props *)
set thePropList to get properties of this_item
(* in a try/catch as prop not set for the diff windows *)
try
set CurrentView to current panel of thePropList
set shouldClose to true (* no error, it's an info panel, so close *)
on error
log "Not an info panel, leaving open: " & windowName
end try
(* this try/catch is just for a double check, feel free to comment out *)
try
set CurrentView to current view of thePropList
on error
if shouldClose = false then log "Not an info panel: " & windowName
end try
if windowName ends with " Info" and shouldClose then
close this_item
log "Closing info panel: " & windowName
end if
end repeat
end tell