Answered
Action calling a script ignores selection[0] calls
This script works if I call it via menu file/scripts/scriptname, but when I assign an action to run it, the action ignores the selection[0] calls. I'm trying to get this script to run with a function key.
if ( app.documents.length > 0) {
doc = app.activeDocument;
selection[0].embed()
app.executeMenuCommand ("releaseMask")
app.executeMenuCommand ("ungroup")
selection[0].remove();
}

