S
schau.hans
Aktives Mitglied
Thread Starter
- Dabei seit
- 09.01.2006
- Beiträge
- 511
- Reaktionspunkte
- 21
Hi, das wird jetzt meine erste Umfrage.
Mich interessiert was für Skripts ihr in Verwendung habt, und für was diese gut sind.
Wenn möglich speichert das Skript in diesen Thread.
ich mach mal den Anfang:
1) unsichtbare Files/Ordner ein-/ausblenden und sichtbar/unsichtbar machen
2) alle Info-Fenster ausblenden
Mich interessiert was für Skripts ihr in Verwendung habt, und für was diese gut sind.
Wenn möglich speichert das Skript in diesen Thread.
ich mach mal den Anfang:
1) unsichtbare Files/Ordner ein-/ausblenden und sichtbar/unsichtbar machen
Code:
(*
Beim Doppelklicken wird der Finder neu gestartet und die unsichtbaren Files/Ordner eingeblendet wenn diese zuvor unisichtbar waren und ausgeblendet wenn diese sichtbar waren.
*)
property workingfilename : "~/Library/Preferences/com.apple.finder.plist"
on run
display dialog "Versteckte Systemfiles/-folders und unsichtbare Files/Folders..." buttons {"Abbrechen", "Ausblenden", "Anzeigen"} default button 1
if the button returned of the result is "Anzeigen" then
tell application "System Events" to set value of property list item "AppleShowAllFiles" of contents of property list file workingfilename to "true"
tell application "Finder"
quit
delay 1
tell application "Finder"
launch
end tell
end tell
else if the button returned of the result is "Ausblenden" then
tell application "System Events" to set value of property list item "AppleShowAllFiles" of contents of property list file workingfilename to "false"
tell application "Finder"
quit
delay 1
tell application "Finder"
launch
end tell
end tell
end if
end run
(*
Wenn ein oder mehrere Files/Ordner auf das Programm gewogen werden, werden diese unisichtbar bzw. wieder sichtbar, je nachdem ihr vorherieger Zustand war. Sichtbare Files/Ordner werden unsichtbar, und umgekehrt.
*)
on open theseItems
display dialog "Sichtbare Files/Folders die auf das Programm gezogen wurden werden unsichtbar und unsichtbare sichtbar!" buttons {"Abbrechen", "Fortsetzen..."} default button 1
if the button returned of the result is "Fortsetzen..." then
repeat with anItem in theseItems
set anItem to anItem as alias
tell application "System Events"
set VisResult to get visible of anItem
if VisResult = true then
set visible of anItem to false
else
set visible of anItem to true
end if
end tell
end repeat
else
-- action for 2nd button goes here
end if
end open
2) alle Info-Fenster ausblenden
Code:
-- Skript schließt alle offenen Info-Fenster
try
repeat
tell application "Finder" to close information window 1
end repeat
end try