Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scripting Word top copy text - should be simple, but ain't



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:
http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden

References: 
 >Re: scripting Word top copy text - should be simple, but ain't (From: Michelle Steiner <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.