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 > Developer > AppleScripting Omni Apps
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Moving object after click action Thread Tools Search this Thread Display Modes
Hello,

I'm badly stuck with a task here and need the help of some experts.

This is what I want to do: When clicking on an object (shape) in presentation mode, one or more other objects should move (by changing their origin?). Sounds quite easy, but unfortunately my Applescript knowledge is less than none.

Maybe someone can point me to the right direction? Thanks in advance! :)

Johannes
 
I'm not sure that this kind of thing really works all that well - the screen updating seems a bit intermittent. Dbl-click, wait a bit, may work or may not, then suddenly moves twice ... not ideal for real presentations ...

Code:
tell application id "OGfl"
	-- Get the unique Id of the shape which contains the action script
	set lngId to id of self
	
	-- apply a movement to all the other shapes on the canvas
	tell canvas of self
		repeat with oShape in (shapes where id is not lngId)
			set lstOrigin to origin of oShape
			set item 1 of lstOrigin to (item 1 of lstOrigin) + 100
			set origin of oShape to lstOrigin
		end repeat
	end tell
end tell
 
Thank you so much, Rob! It works perfect for my purpose!
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Double-click for Focus in New Window gone? [A: v1.9 changed to Option-Double Click.] bjornkri OmniFocus 1 for Mac 11 2012-05-17 09:52 AM
Moving action items between groups c12281 OmniFocus 1 for Mac 1 2010-07-24 08:04 AM
Why are my squares moving when I double-click? daveburke OmniGraffle General 1 2008-07-07 12:58 PM
Section object fails with single-action lists ? RobTrew OmniFocus Extras 0 2008-02-18 02:13 AM
Double Click Below Ex. Action = Adds New Action? filip OmniFocus 1 for Mac 4 2008-01-08 10:49 AM


All times are GMT -8. The time now is 01:45 AM.


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