var gs=app.activeDocument.graphicStyles[1]; var obj=app.activeDocument.selection[0]; gs.applyTo(obj);