Re: Cocoa program to Activate/Deactivate Screensaver
Re: Cocoa program to Activate/Deactivate Screensaver
- Subject: Re: Cocoa program to Activate/Deactivate Screensaver
- From: Daniel Waylonis <email@hidden>
- Date: Mon, 22 Nov 2004 18:01:33 -0800
On Nov 20, 2004, at 3:51 AM, Apirak wrote:
Dear all,
How to wtire a Cocoa program to Activate and Deactivate Mac OS X Screen-saver. Is it possible to control Screen-saver by my software.
Hi Apirak,
I found (http://www.macosxhints.com/article.php?story=20030224123820592) that you can do it via AppleScript:
tell application "ScreenSaverEngine"
activate
end tell
Pretty cool!
So, you should be able to make an instance of NSAppleScript that you initWithSource: <above string> and executeAndReturnError:
Dan
_________________________________________________
Dan Waylonis email@hidden
Software Engineer http://www.nekotech.com
nekotech SOFTWARE 650.964.2490 (O)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden