IB Scripting?

I have been looking at trying to script IB… I’d like to be able to detect what objects have been added to the frontmost nib but it appears that the document class access is broken (there’s two classes with the same name/code) and besides connections/ASKObjectInfo objects are not that usefull… Is there anyone who knows a good way to either script IB, or read the nib file format to get the data forcefully (say with obj-c)?