Changing size of canvas in AppleScript
Hello,
I'm trying to create a canvas of a specific size via AppleScript with the current three lines, but they keep giving me an error. [CODE] close front window make new document with properties {template: \"Blank\"} make new canvas with properties {page size: {600, 600}} [/CODE] [INDENT]execution error: OmniGraffle Professional 5 got an error: Can’t make or move that element into that container. (-10024)[/INDENT] If I try not closing it, but editing the existing canvas, I get a different error. [CODE] set page size of properties to {600, 600} [/CODE] [INDENT] OmniGraffle Professional 5 got an error: Can’t make page size of properties of canvas of window 1 into type reference. (-1700) [/INDENT] Does anybody know if it's possible to put a new canvas into a document of a specific size from Applescript this way? |
Found my solution.
[CODE] close front window make new document with properties {template: \"Blank\"} set properties of first canvas of first document to {canvasSize: {pageWidth, pageHeight} [/CODE] Just needed to change the handle to the document and not the canvas itself. |
All times are GMT -8. The time now is 02:05 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.