The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniGraffle Extras (http://forums.omnigroup.com/forumdisplay.php?f=7)
-   -   Accessing menu commands using Applescript (http://forums.omnigroup.com/showthread.php?t=20506)

schlemmsy 2011-03-25 05:19 AM

Accessing menu commands using Applescript
 
Hello all

I'm making a lot of wireframes in Omnigraffle Pro and am communicating them in a couple of ways.
First is by making short films (using ScreenFlow). That's relatively quick.
The second is by exporting each screen of the clickthrough to a pdf and then marking up the click/touch events using Annotations in Preview. This takes a while. The last one was 150 pages long.

The ultimate goal is to create a script that exports a .pdf every time I execute a mouse click in Omnigraffle.
The intermediate stage is to create a button on a Layer in Omnigraffle that when clicked Exports the current view to .pdf. But at the moment I can't even get the Applescript to open File > Export...
Although the script seems well formed I just get an Invalid Index Applescript Error back.
Can anyone tell me what am I doing wrong, please?

Here's the code:

[CODE]activate application "OmniGraffle Professional 5"
tell application "System Events"
tell application process "OmniGraffle Professional"
click menu item "Exportů" of menu item "File" of menu bar item "File" of menu bar 1
end tell
end tell[/CODE]

Thanks


All times are GMT -8. The time now is 11:14 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.