Script to add mask of current layer to selection
I have a recorded action where parts of it is running scripts in order to achieve what I need.
I now need a piece of script that will add the mask of the current layer to selection. I have tried and tried (with the help of Claude.ai 😁), but cannot get it to work. Can you help me?

