Re: Starting the screensaver from code
Re: Starting the screensaver from code
- Subject: Re: Starting the screensaver from code
- From: Eric Peyton <email@hidden>
- Date: Tue, 11 Dec 2001 08:42:51 -0600
On Tuesday, December 11, 2001, at 05:20 AM, Angela Brett wrote:
Hi,
Is there a way that my app can immediately start a screen saver, like
System Preferences does when you press the 'Test' button? Starting any
screensaver would be good, but I'm guessing it would be a lot simpler
to somehow tell the system to run the screen saver that's currently
selected. Is there an AppleEvent or Notification or something like that
I could use?
There is no AppleEvent or Notification you can use, but you can still
start it immediately ...
(Here comes one bad example for simplicities sake, please don't use
system() in a shipping app use fork()/exec() or NSTask. The system call
will NOT return until the app is done (i.e. the user clears the
screensaver))
system("/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.
app/Contents/MacOS/ScreenSaverEngine");
Would do it ...
Eric
-- Angela Brett email@hidden
http://acronyms.co.nz/angela
A mathematician is a machine for turning coffee into theorems -- Paul
Erdos
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.