…und um Bordsteine mache ich zukünftig einen großen Bogen!
©Crash-Bumm-Hubi
--©hubionmac.com 18.12.2008
-- GUI-Skript mit dem die aktuelle Air-Tunes ausgabe verändert wird,
-- die aktuelle Airtunes-Lautsprecher-Auswahl werden quasi
activate application "iTunes"
tell application "System Events"
get system attribute "sysv"
if result is greater than or equal to 4144 then -- Mac OS X 10.3.0
if UI elements enabled then
tell application process "iTunes"
if (name of button 15 of window "iTunes" as text) ≠ "" then
set noe to false
click button 15 of window "iTunes" --Den ITunes Lautsprecher Button drücken
delay 0.25
-- in der Liste ganz nach unten gehene (mehrere Lautsprecher auswählen Menüpunkt
repeat with i from 1 to 5
key code 125
end repeat
keystroke return
try
repeat with i from 1 to (count of every UI element of window 1)
tell UI element i of window 1
set rowcount to count of rows
if rowcount > 0 then
if (value of checkbox 1 of row rowcount) as integer = 0 then
--dieser part beugt einer Fehlermeldung vor…
--welcher? einfach mal diesen if-Block entfernen und Du wirst sehen =)
click checkbox 1 of row rowcount
set rowcount to rowcount - 1
end if
repeat with rownr from 1 to rowcount
click checkbox 1 of row rownr
end repeat
end if
end tell
end repeat
end try
keystroke "w" using command down
else
set noe to true
end if
end tell
else
beep
display dialog "GUI Scripting is not enabled" & return & return & "Open System Preferences and check Enable Access for Assistive Devices in the Universal Access preference pane, then run this script again." with icon stop
if button returned of result is "OK" then
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.universalaccess"
end tell
end if
end if
else
beep
display dialog "This computer cannot run this script" & return & return & "The script uses GUI Scripting technology, which requires an upgrade to Mac OS X 10.3 Panther or newer." with icon caution buttons {"Quit"} default button "Quit"
end if
end tell
if noe = true then
tell application "iTunes" to display dialog "nö, keine Airtunes Lautsprecher angeschlossen bzw. kein Button da, wo man so etwas auswählen könnt :-/"
end if
Manchmal möchte man vielleicht genau wissen, was und vor allen Dingen wohin der Rechner gerade etwas schreibt/speichert oder löscht. Bis dato habe ich mir mit ´fs_usage´ beholfen. Ein deutlich komfortableren Weg kann man nun unter10.5 beschreiten indem man sich die Einträge des fsloggers anzeigen lässt (die nutzt u.a. auch TimeMachine um Dateiänderungen ggf. schneller festzustellen) und ein super Tool (Donationware!) dies gleich grafisch aufzubereiten ist fseventer.
Vorangegangen war ein Apfetalk-Posting, worauf das die Antwort war:
(**
© hubionmac.com 2008
Beschreibung:
das Skript fügt allen ausgewählten Kontakten im Adressbuch ein Datum hinzu mit
mit der Bezeichnung "Letzter Kontakt" und setzt dieses Datum auf das aktuelle Datum.
Sollte ein Datum mit dieser Bezeichnung breits exisitieren, wird dieses entsprechend aktualisiert**)
set mydate to current_date()
set DateLabel to "Letzter Kontakt"
tell application "Contacts"
set these to selection
repeat with this in these
if (label of every custom date of this) contains DateLabel then
repeat with the_customdate_id from 1 to (count of every custom date of this)
if label of custom date the_customdate_id of this = DateLabel then exit repeat
end repeat
set value of custom date the_customdate_id of this to mydate
save
else
tell this to set new_custom_date to make new custom date at end of custom dates with properties {label:DateLabel, value:mydate}
save
end if
end repeat
end tell
on current_date()
-- gibt das Datum in dem Format aus: date "Samstag, 27. September 2008 12:00:00 Uhr"
-- was anderes futtert das Adress-Buch anscheinend nicht
set h to current date
set hours of h to 12
set minutes of h to 0
set seconds of h to 0
return h
end current_date
Anpassung für Kipp
(**
© hubionmac.com 2008
Beschreibung:
das Skript fügt allen ausgewählten Kontakten im Adressbuch ein Datum hinzu mit
mit der Bezeichnung "Letzter Kontakt" und setzt dieses Datum auf das aktuelle Datum.
Sollte ein Datum mit dieser Bezeichnung breits exisitieren, wird dieses entsprechend aktualisiert
09.08.2012 Änderung:
Statt des Datumseintrages wird der DatenTyp related names genutzt und vor dem Datum werden noch die Initiale des Users eingefügt.
**)
set mydate to return_firstChars() & " " & (do shell script "date '+%Y-%m-%d'") as text
set DateLabel to "Letzter Kontakt"
tell application "Contacts"
set these to selection
repeat with this in these
if (label of every related name of this) contains DateLabel then
repeat with the_customdate_id from 1 to (count of every related name of this)
if label of related name the_customdate_id of this = DateLabel then exit repeat
end repeat
set value of related name the_customdate_id of this to mydate
save
else
tell this to set new_custom_date to make new related name at end of related names with properties {label:DateLabel, value:mydate}
save
end if
end repeat
end tell
on return_firstChars()
set userName to long user name of (system info)
set m to ""
repeat with w in every word of userName
set m to m & character 1 of w
end repeat
return m as text
end return_firstChars
Ist wirklich ein geniales Projekt. Anscheinend wurde die Projektseite seit einiger Zeit nicht mehr gepflegt, aber die Software scheint wirklich gut zu sein.Einfach Handhabung und vor allen Dingen scheint es merklich schneller als iTunes zu sein!Ich teste es noch, aber so wie das gerade hier auf meinem iBook700 abgeht, denke ich, es ist eine gelungene Alternative zu der bisherigen iTunes-Sever-Lösung.Zudem kann ich jetzt auf die iTunes-Scripte verzichten, die immer regelmäßig die Ordner auf neu Dateien durchsucht haben.****