Re: XPress: error checking snip slows script
Re: XPress: error checking snip slows script
- Subject: Re: XPress: error checking snip slows script
- From: JJ <email@hidden>
- Date: Thu, 14 Jun 2001 16:14:10 +0200
>
This snip slows down my script. Why?
>
(*
>
if selection /= null then
>
set currentSelection to current box
>
else
>
display dialog "No selection, try again."
>
return
>
end if
>
*)
"Slow"? How much?
An alternative:
(*
set currentSelection to current box
if currentSelection = null then
display dialog "No selection, try again."
return
end if
*)
Your script, tested on my machine, (exists selection, events registry):
get selection of document 1
get current box of document 1
The alternative (exists selection, events registry):
get current box of document 1