Mac OS X tercihlerini bir kabuk dosyasına kaydetmenin herhangi bir yolu var mı?


17

Mac işletim sistemimi yeniden yüklediğimde ve / veya yeni bir Mac aldığımda, fare, dock vb. Seçeneklerinin neredeyse tamamını manuel olarak yapılandırmam gerekiyor.

Mac OS veya bazı yazılımların, Sistem Tercihleri ​​uygulamasıyla kurduğum tüm yapılandırmaları bir kabuk dosyasına kaydetmek için bir yol sağlayıp sağlayamayacağını bilmek istiyorum, Mathias Bynens'in https://github.com/mathiasbynens/ dotfiles / damla / ana / .macos

Yanıtlar:


11

Sistem Tercihleri, kullanıcıya veya sisteme özgü olmalarına bağlı olarak çeşitli yerlerde depolanmış gibi görünmektedir. Bunların çoğu /Library/Preferences/veya $HOME/Library/Preferences/(kullanıcı başına ayarlar için) içinde saklanır . Ancak her tercih bölmesinin bunları saklama yöntemi kendi olacaktır.

Hangi tercihlerin bu şekilde depolandığını yazarak görebilirsiniz:

defaults read <domain>

<domain>Kullanıcı başına sistem tercihlerinizde dosya adının başlangıcı veya bir .plistdosyanın tam yolu nerede . Örneğin:

defaults read com.apple.screensaver
defaults read /Library/Preferences/com.apple.screensaver

Birincisi, ekran koruyucu ayarlarını kullanıcı başına özelleştirmenizi gösterirken, ikincisi sistem ekran koruyucu ayarlarını gösterecektir.

Ayarlar büyük ölçüde tercih bölmesine göre düzenlenir, ancak bu kadar basit değildir. Hepsini bulmak için muhtemelen /Library/Preferencesalt klasörleri ve alt klasörleri (özellikle SystemConfiguration) kurcalamanız gerekir.

Bir seçenek, sadece ilgili dosyaları kopyalamak ve yeni kurulumlar için yerine koymaktır.

Başka bir yol, gerektiği gibi dışa ve içe aktarmak olabilir.

Güç Yönetimi (Enerji Tasarrufu) Sistem Tercihlerini pm.plist'e aktarma:

defaults export /Library/Preferences/SystemConfiguration/com.apple.PowerManagement pm.plist

Bu tercihleri pm.plistyeni bilgisayardan içe aktarma :

defaults import /Library/Preferences/SystemConfiguration/com.apple.PowerManagement sysprefs.plist

.plistBilgisayarlar arasında paylaşmak istediğiniz / istemediğiniz belirli sistem tercihleri ​​varsa, dışa aktarılan çeşitli dosyaları düzenlemek isteyebilirsiniz. Bu şekilde yerel olarak bazı özelleştirmelere sahip olabilirsiniz ve importkomut bunların üzerine yazmaz, sadece .plistdosyalarda ayarladıklarınızı ekleyin . Sen kullanabilirsiniz defaultskendi değiştirmek için komut .plistsıra dosyaları (ama emin değil sadece bir isim, dosyanın tam yolunu belirtin yapmak, ya da başına kullanıcı tercihlerini değiştirerek olabilir).


1
"com.apple.systempreferences" aslında Sistem için herhangi bir tercih içermiyor. Sistem Tercihleri ​​uygulaması tercihlerini içerir. Dolayısıyla , Sistem Tercihleri ile yaptığınız gerçek yapılandırmaların hiçbiri bu dosyada saklanmaz.
Tony Williams

@TonyWilliams, haklısın, bunu düzeltir ...
drfrogsplat

9

Gerekli tüm değişiklikleri yapmak için otomatik olarak bir komut dosyası oluşturmak neredeyse imkansızdır. Mac sistem yöneticileri, bira veya bourbon içip bu dosyaların bitlerini değiştirerek karanlık barlarda uzun saatler geçiriyorlar - sekmeyi almaya hazır olmadıkça tüm bu işleri paylaşmak istemiyoruz.

Aslında yapılandırma değişikliklerini yakalamanın en kolay yolu anlık görüntü kullanmaktır.

InstallEase'in bir kopyasını alın ve yeni Mac'inizi çekin . Şimdi istediğiniz tüm yapılandırmayı yapın ve başka bir anlık görüntü alabilir ve değiştirilen dosyaları yeni bir Mac'e yükleyecek bir yükleyici oluşturabilirsiniz.

Tabii ki değişiklikleri işletim sisteminin yeni bir sürümüne uygularken komplikasyonlar ortaya çıkabilir, bu yüzden burbon içiyoruz.


"Defaults write" komutu için seçeneklerin bulunduğu en az bir liste var mı?
Enrico P. Varella

Hayır. Defaults komutu sistemdeki herhangi bir tercih dosyasına yazabilir, böylece tam bir liste sağlamak mümkün değildir.
Tony Williams

Bu akıllıca bir fikir.
Danijel-James W

1
InstallEase artık mevcut değil gibi görünüyor
Sebastian

Casper'ın InstallEase yerine kullanabileceğiniz bir anlık görüntü aracı var.
Tony Williams

6

En son temiz yeniden yükleme yaptığımda tüm ~/Library/Preferences/klasörü kopyaladım ve bu yüzden herhangi bir sorunla karşılaşmadım. Uygulamaların eski sürümleri ve Mac'e özgü ayarlar için ayarlar göz ardı edilmelidir. ~/Library/Preferences/Yeni bir kurulumda neredeyse hiç dosya yok ve içindeki tüm dosyaları silerseniz ~/Library/Preferences/, tercih dosyaları gerektiğinde yeniden oluşturulur.

Korumalı alan uygulamaları için tercih dosyaları artık depolanır ~/Library/Containers/, ancak başka bir Mac'e kopyalamanın herhangi bir soruna neden olup olmayacağını bilmiyorum.

Geçiş Yardımcısı'nı da kullanabilirsiniz .

Veya .osxrotaya giderseniz, aşağıdakilerin çıktısını dağıtabilirsiniz defaults read:

  1. Çalıştırmak defaults read|awk 'length<200'>/tmp/a
  2. Bazı ayarları değiştirme
  3. Çalıştırmak defaults read|awk 'length<200'>/tmp/b;diff /tmp/[ab]

GUI'den tercihleri ​​değiştirdiğinizde hangi dosyaların değiştirileceğini görmek sudo opensnoopiçin fseventer'ı çalıştırabilir veya kullanabilirsiniz .


3

Sorunum için en azından yararlı bir şey bulduktan uzun saatler sonra, birçok ortak Mac OS "varsayılan yazma" komutları sağlayan Secrets adlı bir web sitesi buldum .

Her neyse, Tony ve drfrogsplatless bana bana yardımcı olan açıklamalar ve ipuçları verdiğiniz için teşekkür ederiz.

(değiştir: site çevrimdışı, arşivlenmiş sürümü kullanarak)



1

Mackup aradığınız şey. https://github.com/lra/mackup/tree/master/doc


Mackup harika bir araç gibi görünüyor ama varsayılan yazma desteklemiyor. Ayrıca bu, sağladığınız bağlantıdan daha iyi açıklıyor: github.com/lra/mackup
ClintM

1

İşte Mac'im için 2016 yılının Ağustos ayında yazdığım kısmen tamamlanmış bir Apple Script, burada, bir "kavram kanıtı" biraz güçlü, ancak oynayabileceğiniz bir şey:

(* Bu komut dosyasını çalıştırmadan önce önce Sistem Tercihleri ​​-> Güvenlik ve Gizlilik -> Erişilebilirlik altında Apple Script taytları vermeli ve Apple Script'in bilgisayarı kontrol etmesine izin vermelisiniz. Sonra komut dosyasını durdurun, bu Tercihler iletişim kutusuna gidin ve Komut Dosyası Düzenleyicisi'nin yanındaki kutuyu işaretleyin, ardından geri dönebilir, daha önce alınmış olan tüm ekran görüntülerini silebilirsiniz (kopyaları karıştırmamak için) ve komut dosyasını yeniden başlatabilirsiniz.

Bunu neden yapmanız gerekiyor? Bazı ön diyalogların açıldıktan ve "fotoğraflandığından" sonra İptal düğmesine bir fare tıklamasıyla açıkça kapatılması gerekir. Apple Script bu tercih içinde "bilgisayarınızı kontrol etme" hakları olmadığı sürece bunu yapamaz. *)

tell application "System Preferences" to quit
delay 0.25

-- MAKE THE PREFS PICS FOLDER ON THE DESKTOP IF IT ISN'T THERE ALREADY.
-- IF IT IS THERE ALREADY, NO CHECKING IS DONE WITH REFERENCE TO WHATEVER FILES ARE IN IT.
tell application "Finder"
    if not (exists folder "Prefs Pics" of desktop) then
        make new folder with properties {name:"Prefs Pics", location:"desktop"}
    end if
end tell

tell application "System Preferences"
    activate

-- THE PREFS ARE ORDERED BELOW ALPHABETICALLY. TO HAVE THEM SAVE THAT WAY, REMOVE THE ORDER ID (oid) VARIABLE FROM THE CODE LINE SETTING EACH FILENAME. OTHERWISE THE FILENAME WILL BE SET BASED ON THE GROUP AND ICON NUMBERS (ROW AND COLUMN) AS DISPLAYED WHEN SYSTEM PREFS ARE ARRANGED BY CATEGORY.
-- GROUP 4 NO 3 APP STORE
set oid to 43
set current pane to pane "com.apple.preferences.appstore"
-- Now that the first pref window is up, get its name and assign it to a variable
set nid to (get name of first window whose visible is true)
-- Do the same for its ID
set wid to (get id of first window whose visible is true)
-- Now wait one second and capture the window, passing the wid varialble to screencapture's -l switch and the nid variable to the filename to be used, and save the file
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"
-- note you can't be messing around with the computer until the script ends; otherwise you'll interfere and prolly capture wrong winders

-- GROUP 4 NO 7 TIME MACHINE
set oid to 47
set current pane to pane "com.apple.prefs.backup"
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

-- GROUP 3 NO 5 BLUETOOTH
set oid to 35
set current pane to pane "com.apple.preferences.Bluetooth"
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

-- GROUP 4 NO 5 DATE & TIME
set oid to 45
set current pane to pane "com.apple.preference.datetime"
reveal anchor "DateTimePref" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "TimeZonePref" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "ClockPref" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

-- GROUP 1 NO 2 DESKTOP & SCREEN SAVER                                              -- NEEDS TROUBLESHOOTING TO SELECT LEFT PANE IN DESKTOP TAB
set oid to 12
set current pane to pane "com.apple.preference.desktopscreeneffect"
-- reveal anchor "DesktopPref" of current pane
-- set nid to (get name of first window whose visible is true)
-- set wid to (get id of first window whose visible is true)
-- do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "ScreenSaverPref" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

-- GROUP 2 NO 1 DISPLAYS
set oid to 21
set current pane to pane "com.apple.preference.displays"
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"
-- reveal anchor "displaysArrangementTab" of current pane                   -- NEEDS TROUBLESHOOTING
-- reveal anchor "displaysColorTab" of current pane                         -- NEEDS TROUBLESHOOTING
-- reveal anchor "displaysGeometryTab" of current pane                      -- NEEDS TROUBLESHOOTING
-- reveal anchor "displaysDisplayTab"                                               -- NEEDS TROUBLESHOOTING

-- GROUP 1 NO 3 DOCK
set oid to 13
set current pane to pane "com.apple.preference.dock"
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

-- GROUP 2 NO 2 ENERGY SAVER
set oid to 22
set current pane to pane "com.apple.preference.energysaver"
--  reveal anchor "Schedule" of current pane                                        -- NEEDS TO BE CLOSED BEFORE MOVING ON

-- GROUP 1 NO 4 MISSION CONTROL
set oid to 14
set current pane to pane "com.apple.preference.expose"
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

-- GROUP 3 NO 3 EXTENSIONS
set oid to 33
set current pane to pane "com.apple.preferences.extensions"
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

-- GROUP 1 NO 1 GENERAL
set oid to 11
set current pane to pane "com.apple.preference.general"
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

-- GROUP 3 NO 1 ICLOUD  
-- set oid to 31
-- set current pane to pane "com.apple.preferences.icloud"                  -- THIS PREFERENCE WAS NOT COPIED

-- GROUP 3 NO 2 INTERNET ACCOUNTS
-- set oid to 32
-- set current pane to pane "com.apple.preferences.internetaccounts"        -- THIS PREFERENCE WAS NOT COPIED

-- GROUP 2 NO 3 KEYBOARD
set oid to 23
set current pane to pane "com.apple.preference.keyboard" -- NEEDS TROUBLESHOOTING
reveal anchor "keyboardTab" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "Text" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "shortcutsTab" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "InputSources" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "keyboardTab_ModifierKeys" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

tell application "System Events" to tell process "System Preferences"
    click button "Cancel" of sheet 1 of window "Keyboard"
end tell

-- GROUP 1 NO 5 LANGUAGE & REGTION
set oid to 15
set current pane to pane "com.apple.Localization"
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "Region" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "Language" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

-- GROUP 2 NO 4 MOUSE
set oid to 14
set current pane to pane "com.apple.preference.mouse"
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

-- GROUP 3 NO 4 NETWORK
--  set oid to 34
--  set current pane to pane "com.apple.preference.network"

-- GROUP 1 NO 8 NOTIFICATIONS
-- set oid to 18
-- set current pane to pane "com.apple.preference.notifications"

-- GROUP 4 NO 2 PARENTAL CONTROLS
-- set oid to 42
--  set current pane to pane "com.apple.preferences.parentalcontrols"

-- GROUP 2 NO 6 PRINTERS & SCANNERS
--  set oid to 26   
--  set current pane to pane "com.apple.preference.printfax"
-- reveal anchor "fax" of current pane
--  reveal anchor "share" of current pane
--  reveal anchor "print" of current pane
-- reveal anchor "scan" of current pane

-- GROUP 1 NO 6 SECURITY & PRIVACY
set oid to 16
set current pane to pane "com.apple.preference.security"
reveal anchor "General" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "FDE" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "Firewall" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "Privacy" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "Privacy_LocationServices" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "Privacy_Contacts" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "Privacy_Calendars" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "Privacy_Reminders" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "Privacy_Facebook" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "Privacy_Accessibility" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "Privacy_Diagnostics" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"
--  reveal anchor "Privacy_Twitter" of current pane
--  reveal anchor "Privacy_Weibo" of current pane
--  reveal anchor "Privacy_TencentWeibo"
--  reveal anchor "Privacy_Assistive" of current pane
--  reveal anchor "Privacy_LinkedIn" of current pane
--  reveal anchor "Advanced" of current pane

-- GROUP 3 NO 6 SHARING
set oid to 36
set current pane to pane "com.apple.preferences.sharing"
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

-- GROUP 2 NO 7 SOUND
set oid to 27
set current pane to pane "com.apple.preference.sound"
reveal anchor "effects" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "output" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "input" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

-- GROUP 4 NO 4 DICTATION & SPEECH
set oid to 44
set current pane to pane "com.apple.preference.speech"
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "TTS" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "Dictation" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

-- GROUP 1 NO 7 SPOTLIGHT
set oid to 17
set current pane to pane "com.apple.preference.spotlight"
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "privacy" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "searchResults" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

-- GROUP 4 NO 6 STARTUP DISK
set oid to 46
set current pane to pane "com.apple.preference.startupdisk"
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

-- GROUP 2 NO 5 TRACKPAD
set oid to 25
set current pane to pane "com.apple.preference.trackpad"
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

-- GROUP 4 NO 1 USERS & GROUPS
set oid to 41
set current pane to pane "com.apple.preferences.users"
reveal anchor "passwordPref" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "startupItemsPref" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "loginOptionsPref" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

--  reveal anchor "mobilityPref" of current pane
--  set nid to (get name of first window whose visible is true)
--  set wid to (get id of first window whose visible is true)
--  do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

-- GROUP 4 NO 8 ACCESSIBILITY
set oid to 48
set current pane to pane "com.apple.preference.universalaccess"
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "Seeing_VoiceOver" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "Switch" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "Keyboard" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "Seeing_Display" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "Hearing" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "Seeing_Zoom" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "SpeakableItems" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "Media_Descriptions" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "Mouse" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"

reveal anchor "Captioning" of current pane
set nid to (get name of first window whose visible is true)
set wid to (get id of first window whose visible is true)
do shell script "screencapture -T1 -l" & wid & " ~/Desktop/Prefs\\ Pics/" & oid & "\\ " & quoted form of (nid) & "\\ " & "$(date +%Y-%m-%d-%H%M%S).png"
end tell
tell application "System Preferences" to quit


-- HELPERS FOR THE HOMEWORK THAT NEEDED TO BE DONE BEFORE THE SCRIPT COULD BE WROTEN
-- GET ALL PANE ID'S
-- tell application "System Events"
-- tell application "System Preferences"
-- get the id of every pane
-- end tell
-- end tell


-- GET ALL PANE NAMES
-- tell application "System Preferences"
-- name of panes
-- end tell


-- GET THE ANCHOR NAME FOR A PARTICULAR PANE
-- tell application "System Preferences"
-- activate
-- get the name of every anchor of pane id "com.apple.preferences.users"
-- end tell
Sitemizi kullandığınızda şunları okuyup anladığınızı kabul etmiş olursunuz: Çerez Politikası ve Gizlilik Politikası.
Licensed under cc by-sa 3.0 with attribution required.