Skip to main content
Loic.Aigon
Legend
February 15, 2008
Question

[AS] Problem setting a var to geometric bounds

  • February 15, 2008
  • 2 replies
  • 435 views
Hi,
I am trying to set a var to geometric bounds of identified object and get a error message.
Assuming that a page item is labeled "LogoBox"

tell application "Adobe InDesign CS3"
tell active document
set myobj to page items whose label is "LogoBox"
--if myobj exists then display dialog "Hey, I do exist !"
set objbounds to geometric bounds of myobj --(1)
end tell
end tell

(1) here is the error message I get :

i "Impossible dobtenir geometric bounds of {rectangle id 192 of page id 178 of spread id 173 of document \"file_1.indd\" of application \"Adobe InDesign CS3\"}."
>meaning that the script can't obtain geometric bounds...

Where is the error ? Thanks for help in advance.
Loic
This topic has been closed for replies.

2 replies

Inspiring
June 12, 2009

tell application "Adobe InDesign CS3"
     tell active document
          set myobj to every page item whose label contains "LogoBox"

          if myobj is not {} then display dialog "Hey, I do exist !"

            set objbounds to geometric bounds of myobj 

     end tell
end tell                         

~Mike

Known Participant
February 15, 2008
myobj is a list.

try with "item 1 of myobj"