Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Mac Basics and Help

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 6, 2006, 05:51 AM   #1
Will Cheyney
macrumors 6502a
 
Will Cheyney's Avatar
 
Join Date: Jul 2005
Location: United Kingdom
Send a message via AIM to Will Cheyney Send a message via MSN to Will Cheyney
Disabling 'Nap mode' via AppleScript - problems

So, I want to disable 'Nap mode' automatically on start up on my G5.
I came across the following AppleScript code but can't get it to work!

Code:
do shell script "hwprefs cpu_nap=1"
I have also tried the variation of that:
Code:
do shell script "hwprefs cpu_nap=false"
I compiled them and saved as an application, but get this error message whenever they are set to run:

Quote:
hwprefs: PERMISSION DENIED: effective user id MUST be root user to run

Can anyone offer a helping hand?
Thanks
__________________
Love your Mac 3.06Ghz 24" iMac, 4GB RAM, 2.5TB HDD.
Will Cheyney is offline   0 Reply With Quote
Old Jan 7, 2006, 06:13 AM   #2
Nermal
Moderator
 
Nermal's Avatar
 
Join Date: Dec 2002
Location: Whakatane, New Zealand
I'm pretty sure you need root privileges, which means typing your password. This would be a nightmare if the script is running on boot, so I can't offer any suggestions
Nermal is offline   0 Reply With Quote
Old Jan 7, 2006, 06:25 AM   #3
Wes
macrumors 68020
 
Wes's Avatar
 
Join Date: Jun 2001
Location: London
Send a message via ICQ to Wes Send a message via AIM to Wes Send a message via MSN to Wes Send a message via Yahoo to Wes
Yeah you need to be root user so:

do shell script "sudo hwprefs cpu_nap=false"

But then as Nermal says you are going to need to enter your password... I'm sure there is a way to build it into the script though.
Wes is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Mac Basics and Help

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Changing Scrolling Speed with Applescript - Problem Jolly Jimmy Mac Programming 2 Dec 8, 2011 06:40 PM
Disable the mouse input via AppleScript Bassir Mac Programming 2 Aug 2, 2009 07:08 PM
Applescript - Problem with Finder's Dupplicate command cmiorio Mac Programming 1 Mar 19, 2009 02:07 AM
How to Enable/Disable Folder Options Using AppleScript? Isw Mac Programming 5 Jan 11, 2009 06:42 PM
iChat screen name via AppleScript kainjow Mac Applications and Mac App Store 2 Mar 22, 2004 05:41 PM


All times are GMT -5. The time now is 06:54 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC