The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniGraffle > OmniGraffle General
FAQ Members List Calendar Today's Posts

 
Applescript action not working in presentation view Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
I'm using Omnigraffle Pro for some interface prototyping and when the user clicks on a particular object when running in presentation mode I'd like to hide a layer in the current canvas and then jump to a different canvas. I've got lots of actions that either hide/show some layers OR jump to a new canvas, but to do both at the same time it seems like an applescript is necessary.

I have tried a bunch of variations on a script like this:

tell application "OmniGraffle Professional 5"
tell canvas of front window
set visible of layer "My layer" to false
end tell
set canvas of front window to canvas "my other canvas" of document "my doc"
end tell

The script works perfectly when I click on the "Run Script" button in the action property editor. It also seems to work fine when I use the browse tool to click on the object (or when I run the script from the Script Editor). However if I click on it while in presentation mode, I get the following error:

OmniGraffle Professional 5 got an error: AppleEvent handler failed.

If I comment out the "set canvas of front window..." line, then it works, so that seems to be the line that doesn't work in presentation mode.

Any suggestions how to change the script to work from presentation mode or is this a known problem?
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
View Parent action in Context view alexisvx OmniFocus 1 for Mac 7 2013-07-11 03:43 PM
Working Hours For A Day In Applescript bjmclaughlin OmniPlan Extras 4 2011-04-06 02:37 AM
What isn't this action working? macula OmniOutliner 3 for Mac 2 2010-06-14 08:55 AM
Ability to add children to action I am working on SpiralOcean OmniFocus for iPhone 0 2008-11-20 06:25 AM
Applescript, Presentation Mode & View bertie OmniGraffle General 0 2006-09-21 02:32 AM


All times are GMT -8. The time now is 07:18 AM.


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