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: Christopher Nebel <email@hidden>
- Date: Fri, 10 Dec 2004 12:11:19 -0800
On Dec 9, 2004, at 11:57 AM, Joseph Weaks 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.
If I change it to
tell application "Microsoft Word"
activate
set the clipboard to theString
end tell
it still makes no difference. 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.
Try reversing the "activate" and the "set the clipboard". (Also,
moving the "set" outside of the "tell" might help. Probably doesn't
matter, though.) Applications that use their own clipboard storage
typically update it on activate/deactivate.
--Chris Nebel
AppleScript Engineering
_______________________________________________
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