View Single Post
I'm attempting to write an applescript to sit in a subgraph object. the aim of the script is to toggle the state of the subgraph. I am failing to get my if statement to work and have tried all sorts of incorrect syntax. Please correct my code

tell application "OmniGraffle Professional 5"
	tell canvas of front window
		set theProps to (get the properties of subgraph -1)
		if theProps(collapsed) then
			--display dialog "I'm Collapsed"


			--display dialog "I'm Expanded"
		end if
		--set properties of subgraph -1 to {collapsed:true}
	end tell
end tell
best wishes