/* ------------------------------------ Copy CSS Dimensions v1.0 ------------------------------------ Created by Matt Stow 2010 http://www.mattstow.com ------------------------------------ */ (function() { if (fw.documents.length == 0) { return; } if (fw.selection != null && fw.selection.length == 1) { var originalSelection = [].concat(fw.selection); var dom = fw.getDocumentDOM(); var css = "height: " + fw.selection[0].height + "px;\r\n\twidth: " + fw.selection[0].width + "px;" dom.addNewText({left:-100, top:-100, right:-100, bottom:-100}, true); var tr = fw.selection[0].textRuns; tr.textRuns = [{changedAttrs: {}, characters:css}]; fw.selection[0].textRuns = tr; dom.clipCopyFormats("(ADOBE AI3)"); dom.deleteSelection(false); fw.selection = originalSelection; } else { alert("Please select an object before running this command"); } })()