• 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: QuarkXPress: Script crashes: why?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: QuarkXPress: Script crashes: why?


  • Subject: Re: QuarkXPress: Script crashes: why?
  • From: Shane Stanley <email@hidden>
  • Date: Sat, 17 Feb 2001 08:25:58 +1100

On 17/2/01 6:48 AM +1000, Michael Turner, email@hidden, wrote:

> The following snip crashes my Quark:
>
> tell application "QuarkXPress 4.1"
> activate
> try
> set first character of text of story 1 of text box
> "FredTheBox" of current spread
> to "<ELEMENT=" & elementString & "a" & ">" &
> return & first character of text of
> story 1 of text box "FredTheBox" of current spread
> set last character of text of story 1 of text box "FredTheBox"
> of current spread
> to last character of text of story 1 of text box "FredTheBox"
> of current spread & addString
> on error
> display dialog "Script Broke!"
> end try
> end tell
>
> -- error crashes QuarkX, I don't get the "Script Broke!" message
>
> What did _I_ do?

I don't know exactly why it crashed, but you're doing too much work there.
Try something like this:

set elementString to ""
tell application "QuarkXPress 4.11"
tell document 1
tell text box "FredTheBox" of current spread
set before story 1 to "<ELEMENT=" & elementString & "a" & ">" & return
set after story 1 to "Bit at the end"
end tell
end tell
end tell

--
Shane Stanley, email@hidden


  • Follow-Ups:
    • Re: QuarkXPress: Script crashes: why?
      • From: Michael Turner <email@hidden>
References: 
 >QuarkXPress: Script crashes: why? (From: Michael Turner <email@hidden>)

  • Prev by Date: Re: Re: AS Libraries for stay-open CGIs
  • Next by Date: Re: re posting scripts
  • Previous by thread: Re: QuarkXPress: Script crashes: why?
  • Next by thread: Re: QuarkXPress: Script crashes: why?
  • Index(es):
    • Date
    • Thread