Applescripted Energy Preferences for mac laptop automation

Hey everybody,… so everyone helped me try to write a script so that I could automate switching energy preferences in mac os X quickly. this is for everyone who has a laptop ibook or powerbook that would like to do this to.

the file com.apple.PowerManagment.plist can be found in main drive … in the path library/preferences/SystemConfiguration/com.apple.PowerManagment.plist

First, copy the file com.apple.PowerManagment.plist when in high performance mode. and place that file ina directory called high_perfomance in your home directory.

Second, copy the file com.apple.PowerManagment.plist whien in long lasting battery mode and place that file in a directory call llb in your home directory.

then write an apple script with this code

display dialog “What energy setting would you like?” buttons {“Cancel”, “High Performance”, “Long Lasting Battery”} default button 3
if the button returned of the result is “High Performance” then
tell application “Finder”
do shell script “cp /users/cspalian/high_perfomance/com.apple.PowerManagement.plist /Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist”

end tell

else
tell application “Finder”
do shell script “cp /users/cspalian/llb/com.apple.PowerManagement.plist /Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist”

end tell

end if

this will display a dialog with the choice of choosing high performace mode or long lasting battery mode.

Thank you all for all your help
Chris palian