Re: scripting Word top copy text - should be simple, but ain't
Re: scripting Word top copy text - should be simple, but ain't
- Subject: Re: scripting Word top copy text - should be simple, but ain't
- From: Brennan <email@hidden>
- Date: Thu, 27 Apr 2006 08:58:23 +0200
On 25/4/06 at 18:41, Michelle Steiner <email@hidden> wrote:
> > Except: how do you work out what document you've opened?
>
> Either by name, or by the fact that the most recently opened document
> is window 1 or document 1.
Yes, unless (for some reason) 'open' fails silently, in which case
'document 1' might be something totally different.
It's a dangerous heuristic to assume that 'document 1' is the same as 'the
most recently opened document', even if you use it on the very next line
after 'open'.
IMNSHO 'open' should either return a document reference or cause an error,
and given it's a required Apple Event, that goes for ALL apps. Any other
behavior is a bug and should be reported as such to the developers.
FWIW this problem is not confined to Word. Apple's own TextEdit and many
other cocoa apps have a similar problem. I posted recently a workaround
for QuickTime Player, which also has the same kind of problem (although I
suspect the underlying cause is different in the case of Word).
--
Brennan Young
"Terrorism is not the enemy of the great systems; on the contrary, it is their natural counterweight, accepted, programmed."
-Umberto Eco
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden