Here what I have scripted based on Craig’s great starting script:
It will find the real name of an event, so I am able to create an album with the name of an event.
Another script is ready to write the flat album structure. There is a script from peterjohndean, Australia
which is using the source event name (not the real event name). But the script is great, so I was able to modify it to use the real event name.
But it is not a good idea to create just 1000 flat albums (I have round 1000 event names)
No I am looking for a way to create and write to Folder Albums.
Meanwhile I want to say thank you for your help, Craig.
PS: I guess there is a lot room for improvement in the script I have posted. 
– ******** IMPORTANT **********************************************************************
– Before you test the script, please backup your iPhoto database.
– And create a test database with Starting iPhoto while pressing and holding Option Key (Alt), then create a new Library.
– Please understand that I am not liable for any damage and lost. You try the script on your own Risk.
–****************************************************************************************
– Update: The Script is taking the information from AlbumData.xml, but this file is not always uptodate.
– If you change manually the Event Name, it is not updated in this file. At least not immediately.
set nDebug to 1
set iphoto_album_xml to (path to pictures folder as text) & “Bibliothek iPhoto Test2:AlbumData.xml”
set read_file to open for access iphoto_album_xml
set all_paras to read read_file
close access read_file
set astid to AppleScript’s text item delimiters
–set AppleScript’s text item delimiters to “RollName”
set AppleScript’s text item delimiters to “RollID”
set all_sections to text items 2 thru -1 of all_paras
set AppleScript’s text item delimiters to astid
set event_Names to {}
set eventID_Names to {}
repeat with a_RollID in all_sections
–display dialog a_RollID as text
-- Find Roll_ID which is equal to Event_ID
set beg_name to (offset of "<integer>" in (a_RollID as text)) + 9
set end_name to (offset of "</integer>" in (a_RollID as text)) - 1
set end of eventID_Names to ((characters beg_name thru end_name of (a_RollID as text)) as text)
--display dialog EventID_Names
-- Find Real Event Name as you see it in iPhoto
set beg_name to (offset of "<string>" in (a_RollID as text)) + 8
set end_name to (offset of "</string>" in (a_RollID as text)) - 1
set end of event_Names to ((characters beg_name thru end_name of (a_RollID as text)) as text)
--display dialog "Roll ID=" & EventID_Names & " Event Name= " & event_Names
--display dialog "" & EventID_Names & " " & event_Names
end repeat
set Display_EventAndID to “”
repeat with i from 1 to number of items in event_Names
set a_Event to (item i of event_Names) as string
set a_EventID to (item i of eventID_Names) as string
set Display_EventAndID to Display_EventAndID & a_EventID & " " & a_Event & linefeed
end repeat
if nDebug is 1 then
–display dialog Display_EventAndID
end if
set astid to AppleScript’s text item delimiters
set AppleScript’s text item delimiters to “Roll”
set all_sections to text items 2 thru -1 of all_paras
set AppleScript’s text item delimiters to astid
set Roll_ID to {}
set EventImagePath to {}
repeat with a_Roll_ID in all_sections
--debug display
--display dialog a_Roll_ID as text
-- go to Roll ID and extract EventName which is used by iPhot to store it, so we have a link from real Event Name to storage Event name
set beg_name to (offset of "<integer>" in (a_Roll_ID as text)) + 9
set end_name to (offset of "</integer>" in (a_Roll_ID as text)) - 1
set end of Roll_ID to ((characters beg_name thru end_name of (a_Roll_ID as text)) as text)
--debug display
--display dialog Roll_ID
set beg_name to (offset of "<key>ThumbPath</key>" in (a_Roll_ID as text)) + 20 + 9
set len_name to length of a_Roll_ID
set end_name to beg_name + (offset of "</string>" in (text beg_name thru len_name of (a_Roll_ID as text))) - 1 - 1
--debug display
--display dialog beg_name
--display dialog end_name
set a_EventImagePath to ((characters beg_name thru end_name of (a_Roll_ID as text)) as text)
--display dialog ((characters beg_name thru end_name of (a_Roll_ID as text)) as text)
-- extract the storage event name from path
set astid to AppleScript's text item delimiters
set AppleScript's text item delimiters to "/"
set StorageEventPath to a_EventImagePath's text item -2
set AppleScript's text item delimiters to astid
--display dialog StorageEventPath
set end of EventImagePath to StorageEventPath
end repeat
– remove double entries in event list
set SingleEventList_ID to {}
set SingleEventPathList to {}
repeat with i from 1 to number of items in Roll_ID
set a_Roll_ID to (item i of Roll_ID) as string
set a_EventImagePath to (item i of EventImagePath) as string
if SingleEventList_ID does not contain a_Roll_ID then
set end of SingleEventList_ID to a_Roll_ID
set end of SingleEventPathList to a_EventImagePath
end if
--debug display
--display dialog a_Roll_ID & " " & a_EventImagePath
set display_SingleEvents to ""
end repeat
repeat with i from 1 to number of items in SingleEventList_ID
–(item i of SingleEventList_ID ) as string
–(item i of SingleEventList) as string
--debug display
--display dialog ((item i of SingleEventList_ID) as string) & " " & ((item i of SingleEventPathList) as string)
set display_SingleEvents to display_SingleEvents & ((item i of SingleEventList_ID) as string) & " " & ((item i of SingleEventPathList) as string) & linefeed
end repeat
if nDebug is 1 then
–display dialog display_SingleEvents
set display_all to ""
repeat with j from 1 to number of items in eventID_Names
set nPosition to list_position((item j of eventID_Names), SingleEventList_ID)
--display dialog nPosition
set display_all to display_all & ((item nPosition of EventImagePath) as string) & " " & ((item nPosition of eventID_Names) as string) & " " & ((item nPosition of event_Names) as string) & linefeed
end repeat
--display dialog display_all
end if
set question to display dialog “You have " & (number of items in SingleEventList_ID) & " Events in your Library. Are your sure you want to display so many records in a popup message?” buttons {“Yes”, “No”} default button 2
set answer to button returned of question
if answer is equal to “Yes” then
display dialog Display_EventAndID
display dialog display_SingleEvents
display dialog display_all
end if
– List Position Script from: Sal Soghoian/Bill Cheeseman, AppleScript 1-2-3
on list_position(this_item, this_list)
repeat with i from 1 to the count of this_list
if item i of this_list is this_item then return i
end repeat
return 0
end list_position