• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Quark issue with grouped box & bounds
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Quark issue with grouped box & bounds


  • Subject: Quark issue with grouped box & bounds
  • From: jj <email@hidden>
  • Date: Fri, 11 May 2007 14:06:03 +0200
  • Thread-topic: Quark issue with grouped box & bounds

Hi all!

I have the following stage: two grouped text boxes in a page, both
containing text.

I want to pick the text of one of them and place it in a new-created text
box I will place over the original one (a bit shorter than the original
one), something as (ascii-art):

Original:
----------------------
|                    |
|                    |
|        TEXT        |
|                    |
|                    |
----------------------

Target:
----------------------
|                    |
|   --------------   |
|   |    TEXT    |   |
|   --------------   |
|                    |
----------------------

This is the code:

#################
tell application "QuarkXPress Passport" --> vers 7.1
    --> pick text
    set original to text box 1 of page 1 of document 1
    set selection to (get object reference of text of original)
    cut

    --> pick and modify bounds
    copy bounds of original to bnds
    set {y1, x1, y2, x2} to (coerce bnds to list)

    set x1 to coerce x1 to real
    set x2 to coerce x2 to real
    set y1 to coerce y1 to real
    set y2 to coerce y2 to real

    set x1 to x1 + 2.469
    set x2 to x2 - 2.469
    set y1 to y1 + 2.469
    set y2 to y2 - 2.469

    --> apply both bounds and text to new text box
    set newBoxBnds to {y1, x1, y2, x2} as millimeters rectangle
    set ntb to (make new text box at beginning of page 1 ¬
        of document 1 with properties {color:null})
    set selection to ntb
    set tool mode of document 1 to contents mode
    paste
    set bounds of ntb to newBoxBnds
end tell
#################

This works fine. HOWEVER, when I pick the boxes and move them somewhere
around, the boxes don't move as they should. The original text box moves to
a different place. Also, if I cut all the three boxes, Quark just crashes.

No problem if the original text box is not part of a group.

What is happening or how to fix, or do you have a working alternate for this
simple task?

Thanks in advance!


jj

--
http://www.macscripter.net/
http://www.osaxen.com/


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Quark issue with grouped box & bounds
      • From: Peter Waibel <email@hidden>
    • Re: Quark issue with grouped box & bounds [follow-up]
      • From: jj <email@hidden>
  • Prev by Date: Re: How do I append text at the end of a textedit document?
  • Next by Date: Converting MOD files
  • Previous by thread: Re: GUI scripting menu item with leading spaces
  • Next by thread: Re: Quark issue with grouped box & bounds [follow-up]
  • Index(es):
    • Date
    • Thread