245
salvomi©
osx, Utility, Tips&Tricks, Easter Eggs, AppleScript e AppleScript Studio
http://faqintosh.com/faq/245.xml - XML della Faq: http://faqintosh.com/faq/245-data.xml
5492 giorni, 10 ore, 58 minuti
Creare un Apple Script con le istruzioni visualizzate sotto.
Lo script chiede se si vogliono visualizzare i files nascosti, rispondendo sì viene chiuso e riaperto Finder con le nuove impostazioni. Se i files nascosti sono già visualizzati saranno nuovamente nascosti.
Lo script va posto nella cartella degli script.
on run
try
set onOff to do shell script "defaults read com.apple.finder AppleShowAllFiles"
on error
set onOff to ""
end try
if onOff is in {"NO", "OFF", "0"} then
set newState to "mostrare"
set OnOffCommand to "defaults write com.apple.finder AppleShowAllFiles ON"
else
set newState to "nascondere"
set OnOffCommand to "defaults write com.apple.finder AppleShowAllFiles OFF"
end if
set buttonpressed to the button returned of (display dialog ¬
"Sicuro di voler " & newState & " i files nascosti?" & return & ¬
"(L'operazione riavvia il Finder)" buttons {"Cancella", "OK"} ¬
default button 2 with icon note)
if buttonpressed is "OK" then try
tell application "Finder" to quit
do shell script OnOffCommand
delay 1
tell application "Finder" to launch
end try
end run
Google+ | |
---|---|
|
|