Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.5: Set Time Machine disk via AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Set Time Machine disk via AppleScript
Authored by: Totoleheros on Mar 12, '10 12:50:52PM

Hi,

I'am trying to use this script to switch between my Time Capsule (Home) and a Time Machine hard drive attached by a firewire cable (Work). The problem is with my Time Capsule because it is password protected and when the script select the 'Time Machine', I am asked to enter the password and to Connect to the Time Capsule (and the script process is broken).

Now, with my very poor knowledge of Applescript, I have tried unsuccessfully to have the click done on the connect button (the password is automatically filled in because it is stored in my keychain). Can someone help me please? I'm sure that is must be a line of code only...

Many thanks in advance!!



[ Reply to This | # ]
10.5: Set Time Machine disk via AppleScript
Authored by: travis.lawrie on Jul 28, '10 01:23:45AM

After the line:
click button "Use for Backup" of sheet 1 of window "Time Machine"

I inserted the line:
keystroke return

Whilst this doesn't appear to actually do anything at first, it seems the computer waits about 10 seconds or so (I'm assuming for you to change the password or something) during which time you can click the "Connect" button manually, and then clicks it for you (as it virtually 'clicks' the return/enter key on your keyboard).

This then lets the script get on with what it was doing.

Note: I have written the above in Snow Leopard, and I have no idea if it works on Leopard.



[ Reply to This | # ]