On Oct 13, 2008, at 4:02 PM, Eric Lee wrote:

On Oct 13, 2008, at 10:47 AM, Pierce Freeman wrote:

Hi everyone. I am fairly new to Cocoa, so I apologize if this is a very
basic question (but after searching for awhile I still can't find an
answer). Anyway, I am wondering how I can create a function that will run at intervals. What the function would do is scan which applications are
open, and then output a message to the user if there is a certain
application open (I have already created this part of it). If anyone could
help, that would be great.

Check out NSTimer, NSTimeInterval, and NSRunLoop

Even better, though, would be to use the techniques described in this Technical Note, which avoids the polling that you're trying to do: http://developer.apple.com/technotes/tn/tn2050.html

Cheers,
Ken

_______________________________________________

Cocoa-dev mailing list ([email protected])

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]

Reply via email to