🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #14888

Re: How to use the clipboard of Word?

#14888
From: Dave Platt
Date: Fri, 06 Mar 1987 18:39
42 lines
2709 bytes
Posting-Front-End: GNU Emacs 18.33.2 of Fri Feb 13 1987 on teknowledge-vaxc (berkeley-unix)


Jorma Tarhio asks how to write a desk accessory that can access MS
Word's clipboard.  Jorma, I believe that your inability to access the
MS Word clipboard may be due to a failing on Word's part to follow the
rules of the clipboard (a.k.a. scrap), as described in Inside
Macintosh.  As I recall, it's quite legal for applications to maintain
their own, private scrap, but if they do so then they must be able to
copy its contents to, and from the standard desk scrap at the
appropriate times.

Details about the "rules of the road" can be found in the Scrap
Manager chapter in Inside Macintosh.  I believe that there's a
low-memory counter that is incremented whenever a DA pastes something
into the scrap, and that Word should notice this and copy the desk
scrap into its private scrap.  Similarly, I believe that Word should
be copying its private scrap into the desk scrap when it terminates,
receives a "deactivate" Switcher event, or sees that a desk accessory
is being invoked (via a menu pulldown) or activated (via a mouse-click
in the DA's window). It sounds as if Word is maintaining a private
scrap, but isn't always copying its contents to the desk scrap area
when your desk accessory gains control.

If this is the case, then I fear that you probably can't program
around it, unless you're willing to poke into the guts of Word with
MacNosy or something similar, figure out how it maintains its private
scrap (the format probably won't be the same as the desk scrap), and
interpret its data directly.  Think three times, count to 1000, and
take a long vacation before doing this!!

Disclaimer: "I am only an egg", and have never written a DA.
Correction of my hunch by those more knowledgable is eagerly invited.

                Dave Platt

Internet:  dplatt@teknowledge-vaxc.arpa
Usenet: {hplabs|sun|ucbvax|seismo|uw-beaver|decwrl}!teknowledge-vaxc.arpa!dplatt
Voice: (415) 424-0500
USnail: Teknowledge, Inc.
        1850 Embarcadero Road
        Palo Alto, CA  94303
Technical Details
Message-ID: <10423@teknowledge-vaxc.ARPA>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!ut-sally!husc6!sri-unix!teknowledge-vaxc!dplatt
References: <445@utacs.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!ut-sally!husc6!sri-unix!teknowledge-vaxc!dplatt
From: dplatt@teknowledge-vaxc.ARPA (Dave Platt)
Newsgroups: comp.sys.mac
Subject: Re: How to use the clipboard of Word?
Message-ID: <10423@teknowledge-vaxc.ARPA>
Date: Fri, 6-Mar-87 13:39:04 EST
Article-I.D.: teknowle.10423
Posted: Fri Mar  6 13:39:04 1987
Date-Received: Sun, 8-Mar-87 06:39:11 EST
References: <445@utacs.UUCP>
Organization: Teknowledge, Inc., Palo Alto CA
Lines: 39
In-reply-to: kjr@utacs.UUCP's message of 5 Mar 87 10:55:41 GMT