• 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: Selecting and deleting text in QuarkXPress
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Selecting and deleting text in QuarkXPress


  • Subject: Re: Selecting and deleting text in QuarkXPress
  • From: David Lloyd <email@hidden>
  • Date: Sat, 21 Jul 2001 12:53:36 +1000

Hans Haesler:

> Here is my workaround:
> ---
> tell document 1 of application "QuarkXPress 4.11"
> activate
> make text box at beginning with properties {bounds:{20, 20, 60, 60}}
> set next text box of text box 2 to text box 1
> delete text 1 of text box 1
> delete text box 1
> set lastChar to character -1 of text 1 of text box 1
> if (ASCII number of lastChar) is less than 33 then
> delete character -1 of text 1 of text box 1
> end if
> end tell

Good Hans, however...
It didn't work - not initially anyway...
but modifying this line did:

make text box at beginning with properties
{bounds:{20, 20, 60, 60}, runaround:none runaround}

It appears that your script was assuming that text box runarounds were
turned off by default, or your new text box would not land upon the existing
one...

This alteration made the script work correctly, thus:

tell document 1 of application "QuarkXPress 4.11"
activate
copy bounds of text box 1 to theBounds
make text box at beginning with properties
{bounds:theBounds, runaround:none runaround}
set next text box of text box 2 to text box 1
delete text 1 of text box 1
delete text box 1
set lastChar to character -1 of text 1 of text box 1
if (ASCII number of lastChar) is less than 33 then
delete character -1 of text 1 of text box 1
end if
end tell

(I only created the new text box on top of the existing one because it
looked more "elegant" :)

David Lloyd

---------------------------------
email: email@hidden
web: http://www.kanzu.com
---------------------------------


  • Prev by Date: Re: How do I make applescript wait for application to finish before continuing?
  • Next by Date: can TCP/IP control panel be scripted?
  • Previous by thread: Re: Selecting and deleting text in QuarkXPress
  • Next by thread: Re: Selecting and deleting text in QuarkXPress
  • Index(es):
    • Date
    • Thread