FasdUAS 1.101.10 k l |v LICENSE Copyright 2009 Paton J. Lewis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contributors: --------------- Original source: http://www.macosxhints.com/article.php?story=20080105135511764 Support for Leopard, support for an array of time machines, check for GUI scripting, and bug fixes: Paton J. Lewis This script tries to modify the Time Machine preferences to select a backup drive from the list below. If no such drive is found, no changes are made to the preferences. Growl must be installed to see error and informational messages. Use this script in conjunction with the utility Do Something When (http://www.azarhi.com/) to have Time Machine automatically enable your new backup drive when you connect it.   LICENSE Copyright 2009 Paton J. Lewis <pjl@symbolcraft.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contributors: --------------- Original source: http://www.macosxhints.com/article.php?story=20080105135511764 Support for Leopard, support for an array of time machines, check for GUI scripting, and bug fixes: Paton J. Lewis <pjl@symbolcraft.com> This script tries to modify the Time Machine preferences to select a backup drive from the list below. If no such drive is found, no changes are made to the preferences. Growl must be installed to see error and informational messages. Use this script in conjunction with the utility Do Something When (http://www.azarhi.com/) to have Time Machine automatically enable your new backup drive when you connect it.  l  l r J mTime Machine 1 mTime Machine 2 mTime Machine 3 o 0 drivenames  l l!" !+% Make sure GUI scripting is enabled: "##J Make sure GUI scripting is enabled:  $% $l& &O'( 'r )* )1   uien *o 0 ui_enabled UI_enabled (m ++sevsalis Macintosh HD$H+OSystem Events.appPV7 CoreServices8'7 OOO:Macintosh HD:System:Library:CoreServices:System Events.app$System Events.app Macintosh HD-System/Library/CoreServices/System Events.app/%,- ,lR. .ZR/0 /=12 1o 0 ui_enabled UI_enabled 2m  boovfals 0kN3345 4OK67 6kJ889: 9I" .miscactvnullnull:;< ;r#,=> =5#(?  xppb ?m%&@@AAHcom.apple.preference.universalaccess  kfrmID >1(+  xpcp<B BI-JCD .sysodlogaskrTEXT Cb-4EF Eb-2GH Gb-0IJ Im-.KKLLThis script uses the built-in Graphic User Interface Scripting architecture of Mac OS x which is currently disabled. Jo./  ret Ho01  ret Fm23MMNNYou can activate GUI Scripting by selecting the checkbox "Enable access for assistive devices" in the Universal Access preference pane.DOP  disp Om78PQR  btns QJ;@SST Tm;>UUVV CancelRW  dflt WmCD 7mXXsprfalis| Macintosh HD$H+OSystem Preferences.appPk ApplicationskhO0Macintosh HD:Applications:System Preferences.app.System Preferences.app Macintosh HD#Applications/System Preferences.app/5Y YLLN-Z[ Zl[\] \l^_ ^:4 Register this script with Growl if it's available: _``h Register this script with Growl if it's available: ]ab alSc cQSde dOVfg fk\hhij ir\kkl kJ\gmmno nm\_ppqq(General Notificationors rm_bttuu$Debug Notificationsv vmbewwxx$Error Notification lly yo ,0allnotificationslistallNotificationsListjz{ zrl{|} |Jlw~~ mlo(General Notification mor$Debug Notification mru$Error Notification }l o 40enablednotificationslistenabledNotificationsList{ I| .registernullnull  appl m,Configure Time Machine  anot o ,0allnotificationslistallNotificationsList  dnot o 40enablednotificationslistenabledNotificationsList  iapp mTime Machine gmVY2GRRRalis Macintosh HD$H+W}GrowlHelperApp.appW Resources6pW}WyWxPeO`YMacintosh HD:Library:PreferencePanes:Growl.prefPane:Contents:Resources:GrowlHelperApp.app&GrowlHelperApp.app Macintosh HDLLibrary/PreferencePanes/Growl.prefPane/Contents/Resources/GrowlHelperApp.app/ eR .ascrerr ********b l l C= Select one of the backup drives from the list 'drivenames': z Select one of the backup drives from the list 'drivenames':  l I .miscactvnullnull msprfalis| Macintosh HD$H+OSystem Preferences.appPk ApplicationskhO0Macintosh HD:Applications:System Preferences.app.System Preferences.app Macintosh HD#Applications/System Preferences.app/ l6 O6 O5 k4 I .prcsclicuieluiel n 4  menI m(Show All Preferences n 4  menE m n 4  mbri mView 4  mbar m I .prcsclicuieluiel n 4  butT mTime Machine n 4  scra m 4  cwin m$System Preferences W I .sysodelanullnmbr m?ə I .coredoexboolobj 4  cwin mTime Machine I& .prcsclicuieluiel n" 4"  butT m ! n 4  sgrp m 4  cwin mTime Machine W'I I=D .sysodelanullnmbr m=@?ə I+< .coredoexboolobj n+8 438  sheE m67 4+3  cwin m/2Time Machine lJJ rJi lJe nJe 2ae  crow nJa 4\a  tabB m_` nJ\ 4W\  scra mZ[ nJW 4RW  sheE mUV 4JR  cwin mNQTime Machine o 0 tablecontents rjo mjk o  0 rownumber Xp ~  k     r [ o} } 0 rownumber m|| o{ { 0 rownumber r c n 1z z valL n my y txtf ox x 0tablerow mw w TEXT ov v 0 drivenameu Zts E !  or r0 drivenames !oq q 0 drivename Q "#$ "k%%&' &Ip(o p.miscslctuieluiel (n)* )4n+ n crow +om m 0 rownumber *n,- ,4l. l tabB .mkk -n/0 /4j1 j scra 1mii 0n23 24h4 h sheE 4mgg 34f5 f cwin 5m6677Time Machineo'89 8Ie:d e.prcsclicuieluiel :n;< ;4c= c butT =m>>??Use for Backup <n@A @4bB b sheE Bmaa A4`C ` cwin CmDDEETime Machined9FG FnHI HI_J^ _ 0 growlnoteJKL KmMMNN(General NotificationLO] ObPQ PmRRSSNTime Machine has been set to backup to Qo\ \ 0 drivename]^ IfGT[ TS[ #RZYX Z.ascrerr ********YX $n UV UI WWV W 0 growlnoteWXY XmZZ[[$Error NotificationY\U \m ]]^^RTime Machine preferences were not changedUV Vftsu ~ 0tablerow  osvT T0 tablecontents _` _lSRQSRQ`aP aI4ObN O.prcsclicuieluiel bn0cd c4)0Me M menI em,/ffgg.Quit System Preferences dn)hi h4$)Lj L menE jm'(KK in$kl k4$Jm J mbri mm #nnoo$System Preferences l4Ip I mbar pmHHNP 4Gq G prcs qmrrss$System Preferences mttsevsalis Macintosh HD$H+OSystem Events.appPV7 CoreServices8'7 OOO:Macintosh HD:System:Library:CoreServices:System Events.app$System Events.app Macintosh HD-System/Library/CoreServices/System Events.app/uv ulFEDFEDvwx wlCyzC y>8 Use Growl to display a popup notification to the user. z{{p Use Growl to display a popup notification to the user. x|} |i~ ~IBA B 0 growlnote o@ @ 0 growltype? o> >0str?A Q= O I<; <.notifygrnullnull;: : name o 9 9 0 growltype8 8 titl o 7 7 0 growltype6 6 desc o 5 50str43 4 appl m,Configure Time Machine3 m2GRRRalis Macintosh HD$H+W}GrowlHelperApp.appW Resources6pW}WyWxPeO`YMacintosh HD:Library:PreferencePanes:Growl.prefPane:Contents:Resources:GrowlHelperApp.app&GrowlHelperApp.app Macintosh HDLLibrary/PreferencePanes/Growl.prefPane/Contents/Resources/GrowlHelperApp.app/ R210 2.ascrerr ********10=}/ l.-,.-,/++*) * 0 growlnote ).aevtoappnull****('&% ( 0 growlnote'$$#" # 0 growltype "0str&! ! 0 growltype 0str   name  titl  desc  appl .notifygrnullnull%* UWX h .aevtoappnull**** k6 $,a  0tablerowV+X @ K M Uptwr6D>MRZ]nf 0 drivenames  uien 0 ui_enabled UI_enabled .miscactvnullnull  xppb  kfrmID  xpcp  ret  disp  btns  dflt .sysodlogaskrTEXT ,0allnotificationslistallNotificationsList 40enablednotificationslistenabledNotificationsList  appl  anot  dnot  iapp .registernullnull  prcs  mbar  mbri  menE  menI .prcsclicuieluiel  cwin  scra  butT .coredoexboolobj .sysodelanullnmbr  sgrp  sheE  tabB  crow 0 tablecontents 0 rownumber  kocl  cobj .corecnte********  txtf  valL  TEXT 0 drivename .miscslctuieluiel 0 growlnote7mvEO*,EUOf:/*j O*0*,FO%%%akaakvaka UOhYhOKaAaaamvE`OaaamvE`O*aa a!_a"_a#a$a% &UWX'(hOj O*a)a*/{*a+k/a,a-/a.k/a/a0/j 1O*a2a3/a4k/a5a6/j 1Oh*a2a7/j 8a9j :[OYO*a2a;/ak/j 8a9j :[OYO*a2a?/a>k/a4k/a@k/aA-E`BOjE`CO_B[aDaEl Fkh_CkE`COaG,aH,aI&E`JO_JhR*a2aK/a>k/a4k/a@k/aA_C/j LO*a2aM/a>k/a5aN/j 1O)aOaP_J%l+QOWX'()aRaSl+QYh[OYoO*a+k/a,aT/a.k/a/aU/j 1UUascr ޭ