The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniGraffle General (http://forums.omnigroup.com/forumdisplay.php?f=10)
-   -   Show next Canvas using AppleScript? (http://forums.omnigroup.com/showthread.php?t=15296)

aviflax 2010-02-12 08:26 AM

Show next Canvas using AppleScript?
 
Hi, I'd like to write an AppleScript which will show the next Canvas. Specifically, I'll want it to work in presentation mode. I haven't been able to figure out how. Can anyone help? Thanks!

Joel 2010-02-12 08:43 AM

Well, you could use the Action Inspector's ability to simply switch to the next canvas (or a specific canvas, as well), it's in the "Jumps Elsewhere" portion of the inspector popup.

That said, simply clicking on the empty canvas while in Presentation Mode will advance to the next canvas.

Hope that helps,

aviflax 2010-02-12 09:38 AM

Thanks Joel, but actually, I really want to be able to do this via AppleScript. Is that not possible?

Joel 2010-02-12 10:05 AM

Oh I imagine it's entirely possible, however I'm not the sharpest tool in the shed when it comes to AppleScript, so I gave the easy answer.

aviflax 2010-02-12 10:24 AM

Got it. Is there an AppleScript whiz at Omni who might be able to help?

Joel 2010-02-12 10:27 AM

Just played around with it, and it looks like it's fairly easy to set the jump to a specific canvas:

[CODE]set jump of graphic -1 of it to canvas id 2 of document of front window of application "OmniGraffle Professional 5"[/CODE]

That's as far as I can get with it, but it may be a start towards getting next or previous canvas jumping behavior.

aviflax 2010-02-12 10:32 AM

Hmm, thanks, but that doesn't compile when I paste it in. Did the formatting get messed up?

Joel 2010-02-12 10:39 AM

Here's the full Script instead of just a snippet:

[CODE]tell application "OmniGraffle Professional 5"
tell canvas of front window
make new shape at end of graphics with properties {draws shadow: false, size: {68.000000, 60.000000}, origin: {152.000000, 112.000000}, stroke join: miter}
set jump of graphic -1 of it to canvas id 2 of document of front window of application "OmniGraffle Professional 5"
end tell
end tell[/CODE]


All times are GMT -8. The time now is 03:59 AM.

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