I have saved a selection as a channel called "circle".
I want to apply this selection as a layer mask to all layers
This is the script I have so far
tell application "Adobe Photoshop CC 2015.5"
set theDOC to the current document
set totalLayers to count each layer
repeat with indice from 1 to totalLayers by 1
tell layer indice
-- load the channel
load selection of it from channel "circle" of it
-- I now need a magic command to apply the "circle" selection that is active now, to the current layer as a layer mask, inside this loop
After a deep research I conclude that there is no way to do that, thanks to Adobe. The solution I have for this is:
call that action inside the loop using
do action "mask" from "Default Actions"
Default Actionswith your action name and set where the action is stored.