TimeMachine: it’s alive, alive!

When I bought my iMac, I did a restore from my MacBook TimeMachine backup. When I continued working on my current project, I did notice a difference between the files that were on my MacBook and the files on my iMac. The files restored from the backup were not up-to-date and were from a few days ago.

I tried this snippet on MacOSXHints to compare Time Machine backups to the original drive, and it found differences between the original disk and the backup.

Read More “TimeMachine: it’s alive, alive!”

Bring any window to the front

A question was asked on the apple dev mailing list on how to bring a window with a certain name to the front.

Since I was already working on how to get the list of windows on the screen, I just added some AppleScript to bring the window to the front.

This snippet doesnt use any undocumented techniques, it uses the CGWindow API introduced in Leopard.

I dont consider this code to be production ready, but it works.

Of course, TIMTOWTDI ­čśë

See the code after the jump:
Read More “Bring any window to the front”

Perl is fun

When I reinstalled my iMac 24″, I restored a backup of the iPhoto Library.

But the software I’m working on (eXaPhoto Publisher) couldn’t import correctly an iPhoto album: a lot of pictures were missing. The imedia browser had the same problem, but iPhoto seems smart enough to find the pictures.

When you manage yourself your picture, iPhoto maintains a dummy structure inside the “iPhoto Library”. This structure contains links (aliases) to the original files.

I don’t know how it happened, but all the iPhoto aliases were marked as being on the backup volume. So instead of reimporting all my pictures and risk losing all my albums, I’ve written a Perl script to update all the aliases in “iPhoto Library/Originals” so they point now to the right location.

Read More “Perl is fun”