site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Organization: HoffmanLabs LLC User-agent: Thunderbird 2.0.0.9 (Macintosh/20071031) http://macscripter.net/articles/468_0_10_0_C/ http://www.apple.com/applescript/features/system-prefs.html http://www.opensource.apple.com/darwinsource/10.5/PowerManagement/ http://www.opensource.apple.com/darwinsource/10.5/IOKitUser/pwr_mgt.subproj/ http://www.opensource.apple.com/darwinsource/10.5/xnu/iokit/IOKit/pwr_mgt/ Andrew James writes The users are 100% fine with the idea and all i want to know is if its possible and if so how, it seems no matter where i ask this question i am confronted with other developers views and not a solution There are several fully supported approaches toward this end. The easiest is to go to System Preferences, to Energy Saver, and to disable sleep. I'd expect you could probably toss an AppleScript after the preferences, too. Here are some related articles to that end: Or you could fully manage the user's environment and settings, establish the requisite settings, and lock out access to the Energy Saver preferences. This is often best in a production-oriented environment, as it avoids dealing with changes to the run-time. And then there is the pmset tool available at the shell. See man pmset for details on that. Here are some details from the Darwin source pool: Off-hand, I don't know if there's a way to capture an (asynchronous) change in the user's preferences settings. That might well be massively useful here. With the change notification, you could react appropriately at run time. And regardless of the preferences settings, I'd still tend to code to expect to see a sleep request at run-time. The "big sleep" here being a hard power-down, and that's something you still have to plan for. When it is difficult or impossible to find official documentation within a particular area of an operating system, there's usually a reason for the omission. One of those can be a wish to avoid support costs. (That's as close as I'll come to expressing a view here.) _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Stephen Hoffman