• 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: Invoking 'a Paste' Programmatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Invoking 'a Paste' Programmatically


  • Subject: Re: Invoking 'a Paste' Programmatically
  • From: "Colin Barrett" <email@hidden>
  • Date: Mon, 6 Oct 2008 17:53:20 -0700

On Sun, Oct 5, 2008 at 8:42 PM, Joshua Brickner <email@hidden> wrote:
> I'm wondering if there is a way to programmatically call 'Paste'

If you're running in the process of the foreground app, you could do
something along the lines of:

[[[NSApp mainWindow] firstResponder] paste:nil];

You could also try using Applescript to send either a paste command or
a cmd-V. I'm not sure exactly how that would work, but I'm sure others
on this list do know.

HTH,
-Colin
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Invoking 'a Paste' Programmatically (From: Joshua Brickner <email@hidden>)

  • Prev by Date: Re: NSWindowController retain counts, chapter 2
  • Next by Date: CDMA Programming
  • Previous by thread: Invoking 'a Paste' Programmatically
  • Next by thread: Re: Invoking 'a Paste' Programmatically
  • Index(es):
    • Date
    • Thread