Hello,
I have built and runt the OpenGLScreenSnapshot app successfully using
the sample code available here:
http://devworld.apple.com/samplecode/OpenGLScreenSnapshot/index.html
The app permits to take a picture of the screen.
While running the OpenGLScreenSnapshot app, one must select the
menubar and then select the 'Screen Snapshot' submenu in order to
take a picture.
Instead my intention is to modify the code in order to let the app
launch, take a snapshot saving to a custom location, and then close
automatically.
I am aware of many ways to do the same thing using different methods
(i.e. via command-line, applescript, keyboard shorcuts, etc), but I
am posting here cause I would love to learn about how to modify the
exact code used in the OpenGLScreenSnapshot.xcodeproj.
Reading the MyController.m I find:
------------------------------------------------------
- (IBAction)screenSnapshot:(id)sender
[...]
------------------------------------------------------
I am sure there are at least two solutions to the "quest" I am
offering you:
[1] Adding the correct code would be possible to supersede the
IBAction, letting a custom executable handling the events?
[2] Adding a command-line tool as new target, inserting the correct
code after "int main( int argc, char *argv[] ) ... " and completely
removing the nib?
Maybe the NSApplicationLoad(); class could be of help when using the
g_autoReleasePool.
However, I do not know which are the correct command-line args to add.
Regards, Pippo
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]