Applescript for Selection

39 views
Skip to first unread message

Richard Ridgeway

unread,
Dec 14, 2012, 3:18:39 PM12/14/12
to multiad...@googlegroups.com
Trying to open an element from a script.

If I record the action then I get this:

tell application "MultiAd Creator Pro"

activate

open element 1 of spread 1 of document 1

end tell



From the Multiad Creator Pro.sdef:

selection (list of reference) : The set of selected elements in the current spread.


Yet when I try the code below I get an error:


tell application "MultiAd Creator Pro"

activate

open selection

end tell


What am I missing??  Any Ideas??


Steve are you still on this forum?


Steve Mills

unread,
Dec 14, 2012, 3:22:38 PM12/14/12
to multiad...@googlegroups.com
On Dec 14, 2012, at 14:18:39, Richard Ridgeway <rrid...@dailyastorian.com> wrote:

> Yet when I try the code below I get an error:
>
> tell application "MultiAd Creator Pro"
> activate
> open selection
> end tell
>
> What am I missing?? Any Ideas??
>
> Steve are you still on this forum?

IIRC, the selection object can't handle that verb because the selection can contain multiple elements. Change your script to:

tell application "MultiAd Creator Pro"
activate
open element 1 of selection
end tell

--
Steve Mills
Drummer, Mac geek


Richard Ridgeway

unread,
Dec 14, 2012, 4:07:21 PM12/14/12
to multiad...@googlegroups.com
Thanks for the quick reply.

Works Perfect! Can always count on you!
Reply all
Reply to author
Forward
0 new messages