Bereiche
News
Rewind
Tipps & Berichte
Forum
Galerie
Journals
Events
Umfragen
Themenwoche
Kleinanzeigen
Interaktiv
Anmelden
Registrierung
Zu allen empfangenen Nachrichten
Suche...
Zur erweiterten Suche
Push-Nachrichten von MacTechNews.de
Würden Sie gerne aktuelle Nachrichten aus der Apple-Welt direkt über Push-Nachrichten erhalten?
Forum
>
Software
>
PPC-Programme auf intel Macs finden und kennzeichnen
PPC-Programme auf intel Macs finden und kennzeichnen
alfrank
04.03.07
10:12
Für Besitzer von intel Macs ist dieses AppleScript sicher ganz praktisch, das alle Programme auf der Festplatte daraufhin überprüft, ob sie "PPC-only" sind und wenn ja mit einem gelben Label versieht:
-- Skript-Anfang
-- fetch the system profiler report
tell application "System Profiler"
set the_profile to system profile as string
end tell
-- extract the part of the report we are
-- interested in
set idx to get offset of "Programme:" in the_profile
set idx2 to get offset of "Protokolldateien:" in the_profile
set the_profile_apps to characters idx through idx2 of the_profile as string
-- loop through report
set app_type to 0
repeat with the_line in (every paragraph of the_profile_apps)
if the_line starts with " " and the_line does not start with " " then
-- if line starts with 4 spaces (not 5), it's the
-- start of a new app section
set app_type to 0
else if the_line starts with " Art:" then
if the_line contains "Intel" then
set app_type to 7
else if the_line contains "Universal" then
set app_type to 0
else if the_line contains "PowerPC" then
set app_type to 3
else
set app_type to 1
end if
else if the_line starts with " Ort:" then
set idx to the offset of ":" in the_line
set the_path to characters (idx + 2) through (length of the_line) of the_line as string
set the_app to POSIX file the_path
try
tell application "Finder"
set label index of the_app to app_type
end tell
end try
end if
end repeat
-- Skript-Ende
Die Farben sind im Skript die Nummern, die der Variablen app_type zugewiesen werden:
0: kein Label
Universal
1: rotes Label
unbekannt
3: gelbes Label
PPC
7: graues Label
intel
Hilfreich?
0
Kommentare
alfrank
04.03.07
10:15
Ob gerade laufende Programme Universal oder PPC sind kann man über die Aktivitäts-Anzeige (unter /Programme/Dienstprogramme) herausfinden, wenn man über das Menü Darstellung die Spalte "Art" aktiviert und dann in der Symbolleiste bei Anzeigen auf "Alle Prozesse" stellt.
Hilfreich?
0
Kommentieren
Diese Diskussion ist bereits mehr als 3 Monate alt und kann daher nicht mehr kommentiert werden.