![]() Copy it and paste it into AppleScript editor and run it. Note: these will be placed at the front of the document and you will have to move them manually due to a bug in OmniGraffle's AppleScript implementation related to moving canvases. If additional table-of-content pages are required due to the document being too long to display the TOC on a single canvas, additional canvases will be created to accommodate additional TOC pages. A section is alway kept together unless its height is greater than the canvas height Sections (the section header and its child pages) have no way to alter the default widow/orphan control.It does not gracefully support wrapping long canvas names if a canvas name is so long it wraps, it's not going to look great.The script currently has these limitations. Copy it, paste it into AppleScript Editor, and run it. If you've verified your data and there's still a problem, leave your data in a comment here and I'll investigate. I've tested this on several large charts with no error, so if the script errors out, verify your data. If there's a problem with the text (e.g., no space between the string of o's and the label, skipping a hierarchy level, etc.), the script will probably fail. Note that this script doesn't do a whole lot of error checking. These all start with the prefix "SETTINGS_". There are customizable options at the top of this script. If you compare the list above to the chart above, you'll get the gist of it. Also, children directly follow their parent in this list. Note: there must be a space between the string of o's and the label following it. It must be string of letters, however, and not - say - a string of asterisks. (I'm using the AppleScript keyword "word" to grab that first string only a string of letters is considered a word.) A single "o" is the top level, "oo" is the next level down, etc. I'm using the letter "o" to create this string any letter will work. The hierarchy level of each item is indicated by the length of the string proceeding it. Not that it's hard to press Up-arrow + Left-arrow, but down and over is an inconvenient starting point when the intended offset is either directly below or directly to the right. Copy has a corresponding Paste in Place command which pastes the new object exactly on top of the copied one, but there is no Duplicate in Place option. The duplicated object lands down and over from the original. One shortcoming: there's no ability to duplicate an object such that the new object lands exactly on top of the old one. After moving the first duplicate to where you want it, just hit Control-D over and over to create an equidistant row or stack of objects. OmniGraffle will remember the duplicate's offset from the original, so when you duplicate that duplicate, its own duplicate will appear 20 pixels below it, and so on. Let's say you duplicate an object, and then you move the duplicate directly below the original, leaving 20 pixels between the two objects. It's one key-combo instead of two, but more importantly, it doesn't wipe out whatever you have on your clipboard.Īnd like Copy/Paste, it has a hidden feature. I'm so habituated to using Copy/Paste, but I'm trying to break that habit and use OmniGraffle's Duplicate command instead. Set value of user data item itemName of obj to val (e.g., val isn't a string) else returns passed value. Returns null if obj is an invalid, or value failed to set adds that user-data item if it doesn't exist. Sets user-data item itemName of graphic obj to val, force evaluation of retval to trigger the error: Set retval to value of user data item itemName of obj Returns null if data item doesn't exist, or obj is invalid. Returns value of user-data item itemName of graphic obj. Note that the value set or retrieved is a string. Here are two useful methods for getting and setting user-data items of an object. Using the name of the data item, you can set and retrieve its value in AppleScript. User data is useful when scripting as it's a way of storing values for future use after the script has completed its execution. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |