| OS X - Apps and Games Discussion of applications and games available for Mac OS X. |
| Post Reply | New Thread | Subscribe |
|
|
Thread Tools |
![]() Member Since: Oct 23, 2007
Posts: 4
![]() |
Hello, there. I'm a programmer, but I don't know Applescript nor its APIs. Now I imagine it's time for me to learn.
I run hourly Time Machine backups, then nightly SuperDuper! backups. I'd like to stop Time Machine while SuperDuper! runs. Since SuperDuper! gives us hooks to run a script before and after a backup, I'd like to know how to change the on/off preference in the Time Machine preference pane. Who's willing to point me in the right direction? Google searches were surprisingly fruitless. Thanks for your time. |
| QUOTE Thanks | |
![]() Member Since: Jul 26, 2008
Posts: 2
![]() |
Hi jbrains,
Although it's been nine months since you made this post, I just found it today. Also, I just found the answer to your question today. The following AppleScript uses a shell script to make the changes. The only thing you need to do is to change the name of the Time Machine volume to match yours. if (list disks) does not contain "TimeMachine" then -- If TimeMachine is not mounted, turn it off do shell script "defaults write /Library/Preferences/com.apple.TimeMachine AutoBackup 0" else -- Turn it on do shell script "defaults write /Library/Preferences/com.apple.TimeMachine AutoBackup 1" end if Hope this helps. Cheers, Tony |
| QUOTE Thanks | |
![]() Member Since: Jul 26, 2008
Posts: 2
![]() |
There was an error in my code. The correct code is: if (list disks) does not contain "TimeMachine" then -- If TimeMachine is not mounted, turn it off do shell script "defaults write /Library/Preferences/com.apple.TimeMachine AutoBackup -bool false" else -- Turn it on do shell script "defaults write /Library/Preferences/com.apple.TimeMachine AutoBackup -bool true" end if Sorry about that, Tony |
||||
| QUOTE Thanks | |||||
![]() Member Since: Mar 14, 2009
Posts: 1
![]() |
Thanks apsharmin for the script
What I've been trying to figure out unsucessfully is how to make TM on my mbp location aware so that it is enabled if it detects a certain network and disabled otherwise. That way it only tries to run if the external HD is available. Thoughts on how to do that? |
| QUOTE Thanks | |
| Post Reply | New Thread | Subscribe |
| Thread Tools | |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|
|||||||
All times are GMT -4. The time now is 08:23 AM.
Powered by vBulletin