• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: set the clipboard not available in some apps (like Word)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: set the clipboard not available in some apps (like Word)
      • From: Joseph Weaks <email@hidden>
References: 
 >set the clipboard not available in some apps (like Word) (From: Joseph Weaks <email@hidden>)

  • Prev by Date: Re: truncate the hostname of local computer
  • Next by Date: Re: File name list order
  • Previous by thread: set the clipboard not available in some apps (like Word)
  • Next by thread: Re: set the clipboard not available in some apps (like Word)
  • Index(es):
    • Date
    • Thread