Accessing the beauty pass and saving it from the VFB with maxscript

How do you access the beauty pass in the Vray frame buffer, with maxscript?
I need to save each render element with its own unique settings(for example the beauty pass with
exr at 32 bit, the AO with png at 8 bit, the reflection with tif at 16 bit and so on).
I think I can go with the render element manager but I’m not sure this is the right way.
Hints?

Hello

There is a MAXScript function vrayVFBGetChannelBitmap i that returns a Max Bitmap object for the specified channel i. Indices start at 1 and the function returns undefined if you specify an invalid index. Index 1 should be the beauty, 2 - alpha etc..

Some more info here:

Best regards,
Yavor