• 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: Capture Window/View created through NSTask
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Capture Window/View created through NSTask


  • Subject: Re: Capture Window/View created through NSTask
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Sun, 6 Jul 2008 10:28:01 +0200

Each application has its own address space and can access only windows in its space.
So an application cannot draw content into anoter one and so, it's not possible to grab a window from an other application.



Le 6 juil. 08 à 01:28, Michael Moore a écrit :

No, I mean actually capture the fully functional NSView displayed - so I can interact with it, etc.

For example, imagine taking an OpenGL game and embedding the game in a custom nib within a custom application.


On Jul 5, 2008, at 7:11 PM, Jean-Daniel Dupas wrote:


Le 6 juil. 08 à 00:43, Michael Moore a écrit :

I'm hoping someone might be able to assist me with this question.

I have a Cocoa application, with an embedded command-line tool in the
Resources folder. This tool is from an outside source, and I have no
source code available for it. When launched, it creates its own window,
and displays a variety of content. I launch this tool via NSTask
(utilizing NSPipe to communicate with the tool via STDIN, STDOUT, and
STDERR).


What I am hoping to do is find a way to capture the NSWindow/NSView
created by the tool and embed it in a Custom View in my nib. Is there a
way to do this?


Many thanks,
Michael

If you mean create an image from the window contents, you may have a look at the SonOfGrab sample (http://developer.apple.com/samplecode/SonOfGrab/ ) that contains some sample to grab the content of a any window (even in other processes). Note that it requires 10.5.





Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: 
 >Capture Window/View created through NSTask (From: "Michael Moore" <email@hidden>)
 >Re: Capture Window/View created through NSTask (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: NSInvalidArgumentException', reason: '*** -[NSCFArray insertObject:atIndex:]: attempt to insert nil
  • Next by Date: Re: Method Sees Populated Array As Empty
  • Previous by thread: Re: Capture Window/View created through NSTask
  • Next by thread: NSAppleScript - compileAndReturnError always breaks with EXC_BAD_ACCESS
  • Index(es):
    • Date
    • Thread