• 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
Re: Quark issue with grouped box & bounds
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quark issue with grouped box & bounds


  • Subject: Re: Quark issue with grouped box & bounds
  • From: Peter Waibel <email@hidden>
  • Date: Fri, 11 May 2007 16:45:18 +0200


Am 11.05.2007 um 14:06 schrieb jj:

#################
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
#################


Be very carefull with selections!
See my modifications 1, 2, 3, 4.
I checked the code with 6.52.
Don't have the time to do it for 7.1 right now.

Peter


--################# tell application "QuarkXPress" --> 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 -- 1 set selection to null set selected of every text box of document 1 to false --> 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})

	-- 2
	set selected of ntb to true
	--set selection to ntb

	set tool mode of document 1 to contents mode
	paste

	-- 3
	set tool mode of document 1 to drag mode

	-- 4
	set selection to null
	set selected of ntb to false

	set bounds of ntb to newBoxBnds
end tell
--#################

_______________________________________________
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: jj <email@hidden>
References: 
 >Quark issue with grouped box & bounds (From: jj <email@hidden>)

  • Prev by Date: Re: Converting MOD files
  • Next by Date: Smoothly Resize Window via AppleScript Studio
  • Previous by thread: Re: Quark issue with grouped box & bounds [follow-up]
  • Next by thread: Re: Quark issue with grouped box & bounds
  • Index(es):
    • Date
    • Thread