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 "connect" properties Thread Tools Search this Thread Display Modes
In an AppleScript, I am connecting two objects, but I can't seem to use the "with properties" construct appropriately. I am an AppleScript novice, so maybe I have the syntax wrong? I am using the following line:

> set my_line to connect head_shape to tail_shape with properties {tail magnet:tail_mag_idx, head magnet:head_mag_idx}

Here both head_shape and tail_shape are shapes, each with a single magnet, and the values of tail_mag_idx and head_mag_idx are both 1. After I run the line above, the resulting line object (my_line) has 0 in the fields for head magnet and tail magnet. I can then explicitly set those fields below with the following lines:

> set tail magnet of my_line to tail_mag_idx
> set head magnet of my_line to head_mag_idx

After this, everything is as I would expect, so this is an easy enough workaround for my problem. Still, it would be nice to know why the one line syntax is not working. Anyone see an obvious problem with my syntax? Or is this a known bug in "connect"?

Thanks!
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
Weird issue with AppleScript and "open" function einarnn OmniGraffle General 10 2011-10-10 06:03 PM
Applescript to move "maybe someday" projects to separate .ofocus file fudster OmniFocus Extras 1 2010-02-11 09:44 AM
Applescript "Tasks" fails on top-level project sections RobTrew OmniFocus Extras 0 2008-01-11 11:59 PM


All times are GMT -8. The time now is 03:02 AM.


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