View Single Post
If you only want the resizing to apply to selected shapes, you could rewrite it like this:

Code:
property pnumBaseSize : 20
property pnumDeltaPerLine : 20

on run
	tell application id "com.omnigroup.OmniGrafflePro"
		tell front window
			set lstSeln to selection as list
			repeat with oSeln in lstSeln
				if class of oSeln is shape then my SizeByIncoming(oSeln)
			end repeat
		end tell
	end tell
end run

on SizeByIncoming(oShape)
	tell application id "com.omnigroup.OmniGrafflePro"
		tell oShape
			set oLines to its incoming lines
			set numSize to pnumBaseSize + (pnumDeltaPerLine * (count of oLines))
			set size to {numSize, numSize}
		end tell
	end tell
end SizeByIncoming