iphoto - get name of current iphoto library

Does anyone have a snippet where you can find out the name of the current iphoto library that is open?

thanks

Hi,

the information is stored in ~/Library/Preferences/com.apple.iApps.plist


do shell script "defaults read com.apple.iApps iPhotoLastOpenedDatabase"

as always thank you. works.