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 Search Today's Posts Mark Forums Read

 
Applescript action not working in presentation view Thread Tools Search this Thread Display Modes
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?
 
Likely a known issue with respect to AppleScript and Presentation Mode, we added actions in the Action Inspector to hide and show layers in version 5 to workaround this situation, so going that route would be my advice.
__________________
"Vroom! Vroom!!"
 
Normally I do use the hide/show layers action in the Action Inspector. However, in this case I need to hide a layer AND jump to a different canvas. Seems like the only way that I can do both of them is to use an AppleScript in the action. And then I run into the problem with the script working fine except in presentation mode. Any chance this issue will get fixed sometime soon?

Alternately, if the Action Inspector would let me hide/show layers AND jump to a specific canvas, then I could definitely avoid the applescript. Any chance of adding that functionality sometime soon?
 
Well, I've filed a bug against this particular problem, we also have a request to run multiple actions on a shape at one time, which may also facilitate this.
__________________
"Vroom! Vroom!!"
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


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 01:49 AM.


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