is it possible to select multiple layers (with layermask) and merge them?
tell application "Adobe Photoshop CS6"
tell current document
set current layer to every layer of layer set "bloem 1-9" of layer set "Bloem"
tell current layer
merge
end tell
end tell
end tell