function CopyComponentSkin(){ if (fw.selection.length < 2){ alert("This command is used to copy the skin of one Scale-3 or Scale-9 component to another Scale-3 or Scale-9 component.\nYou must arrange the source component with the skin you wish to copy above the destination component, select both, then run this script."); return; } var userIsSure = fw.yesNoDialog("Make sure the source component is arranged above the destination component.\nThis action CANNOT BE UNDONE.\nContinue copying component skin?"); if (!userIsSure) return; var dom = fw.getDocumentDOM(); var oldcomp = fw.selection[0], newcomp = fw.selection[1]; var n, i; // options, script will fail here if not valid components lacking optionsObj CopyOptionProperties(oldcomp.elements[0].customData.optionsObj, newcomp.elements[0].customData.optionsObj); // quadrants n = Math.min(oldcomp.elements.length, newcomp.elements.length); for (i=1; i