On Oct 16, 2008, at 13:15 , Scott Ribe wrote:
I need to write an app whose purpose is to drive other apps, usingNSAppleScript. No UI is needed. But I'm unclear on what kind of environment needs to be set up in order for NSAppleScript to work. I suspect it needs atleast NSRunLoop event processing; I wonder if it might also need an NSApplication around.Past use of NSAppleScript has revealed that it's somewhat "quirky" aboutevent handling, in that what looks like a blocking synchronous call(executeAndReturnError), seems to allow the event loop to keep processingwhile it's waiting for a response. And if it's too much of a pain in the neck, I'll just live with what Ialready know how to do easily: a "GUI" that consists of a status window anda "Quit" menu item ;-)
Add the LSUIElement key to the Info.plist and it will launch without a dock icon or a menu. You can then safely call [NSApplication sharedApplication] from within your application to connect to the window server (so you can use AppKit and other frameworks). Then just do [NSApp run] to start the run loop and the event loop and treat it like normal... no need to create a window (although you could load one if you
ever had a need to). HTH, Jason
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ 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]