Re: How to capture my desktop?
Re: How to capture my desktop?
- Subject: Re: How to capture my desktop?
- From: Joar Wingfors <email@hidden>
- Date: Mon, 26 Feb 2007 17:23:33 +0100
On Feb 26, 2007, at 5:07 PM, Nicko van Someren wrote:
In fact there is no need to send it to a file; you can send it to
the clipboard:
NSArray *args = [NSArray arrayWithObjects: @"screencapture", @"-
Sct", @"tiff", nil];
[[NSTask launchedTaskWithLaunchPath: @"/usr/sbin/screencapture"
arguments: args] waitUntilExit];
NSImage *i = [[[NSImage alloc] initWithPasteboard: [NSPasteboard
generalPasteboard]] autorelease];
Note: Your users might be surprised, or even upset, if you replace
the contents of the clipboard without explicitly asking for
permissions first. The general pasteboard belongs to the user, and
should typically only be altered in response to a direct user action,
like copy / cut.
j o a r
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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