• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa program to Activate/Deactivate Screensaver
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Cocoa program to Activate/Deactivate Screensaver (From: Apirak <email@hidden>)

  • Prev by Date: Re: NSTableView in code
  • Next by Date: Re: NSTableView in code
  • Previous by thread: Cocoa program to Activate/Deactivate Screensaver
  • Next by thread: Not Sure of Memory Leak with ** ?
  • Index(es):
    • Date
    • Thread