reference of result of duplicate command in applescript?
Consider this code to duplicate a selected graphic
[CODE]tell application "OmniGraffle Professional 5" set theSelection to the selection of front window set theObject to item 1 of theSelection duplicate theObject end tell[/CODE] How do I get a reference to the new graphic? |
You can duplicate it to a particular position in the graphics collection, and then reference the graphic at that position:
[CODE]tell application id "OGfl" tell front window set theObject to item 1 of (selection as list) tell its canvas duplicate theObject to end of graphics set oDuplicate to item -1 of graphics end tell end tell end tell[/CODE] |
All times are GMT -8. The time now is 11:47 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.