Can't get visible bounds of selection
I am having a frustrating time starting off with AppleScript in Illustrator. I have one rectangle selected on a page and I want to get the visible bounds. I run the following script:
tell application "Adobe Illustrator"
set myselection to the selection
if myselection is {} then
display dialog "Choose something"
end if
set theBounds to visible bounds of myselection
end tell
When I try to run it, "bounds" is highlighted and I get error:
Expected end of line, etc. but found property.
What am I doing wrong?
