//DESCRIPTION: Add Graphic Line to Parent Group if ((app.documents.length != 0) && (app.selection.length != 0)) { // Check that selected item is member of a group (start simple) mySel = app.selection[0]; myGroup = mySel.parent; if (myGroup.constructor.name != "Group") { errorExit("Selection is not a member of a group"); } myGMbounds = mySel.geometricBounds; myStroke = myGroup.graphicLines.add({geometricBounds:myGMbounds}); } else { errorExit(); } // +++++++ Functions Start Here +++++++++++++++++++++++ function errorExit(message) { if (arguments.length > 0) { if (app.version != 3) { beep() } // CS2 includes beep() function. alert(message); } exit(); // CS exits with a beep; CS2 exits silently. } // +++++++ Script Ends Here ++++++++++++++++++++++++++