Re: set the clipboard not available in some apps (like Word)
Re: set the clipboard not available in some apps (like Word)
- Subject: Re: set the clipboard not available in some apps (like Word)
- From: Paul Berkowitz <email@hidden>
- Date: Sun, 12 Dec 2004 11:49:25 -0800
On 12/9/04 11:57 AM, "Joseph Weaks" <email@hidden> wrote:
> I have a script that places text onto the clipboard. The goal is that
> the user can then paste that text into any app they choose, but as you
> know, it just don't work that way. I think the issue here is that some
> apps use their own clipboard. But, if I say
>
> set theString to "Can you paste me now?"
> set the clipboard to theString
>
> When I bring TextEdit, for instance, to the front, I can paste the
> text. But when I bring Word to the front, paste is dimmed.
Not so. It works perfectly in Word 2004. What version of Word are you using?
In a later message you make some references to Unicode. I'll go there in a
moment. But " Can you paste me now?" is not Unicode and it pastes just fine
into Word 2004. "Paste" is NOT dimmed in the Edit menu in Word. I can't
reproduce this at all.
> If I change it to
>
> tell application "Microsoft Word"
> activate
> set the clipboard to theString
> end tell
>
> it still makes no difference.
This isn't pasting _into_ Word. This is trying to dictate the contents of
the clipboard _in_ Word: basically copying programmatically,
This also works in Word 2004 perfectly. After wiping the Word clipboard and
running the script above, again it pastes theString correctly in Word.
If you're using Word X, forget it. I haven't tested this particular
sequence, but AppleScript doesn't work right there. It might even work OK
sometimes, but not others: it's unstable. Upgrade to 2004 when you can.
> What is the solution for such woes? I'd
> really like to be able to put text in a clipboard that can work in any
> app that the user then brings to the front.
I wouldn't count on Word X. It works fine in 2004. See next message re
Unicode.
--
Paul Berkowitz
_______________________________________________
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