I have been trying to create an applescript that will display a dialog then change the energysaver system preference based on what you have picked and then quit out of system preferences. kind of like what you had done with your netowrking script.
I have created an alias, EnergySaver, in my hard drive, known as Drake, so that way when that line is executed EnergySaver automatically opens
so far this is what ii have…
display dialog “What energy setting would you like to Change to?” buttons {“Cancel”, “High Perfomance”, “Long Battery Life”} default button 3
if the button returned of the result is “High Perfomance” then
tell application “Finder”
open the file “EnergySaver” of disk “Drake”
end tell
quit application "System Preferences"
else
tell application “Finder”
open the file “EnergySaver” of disk “Drake”
end tell
This opens energy saver and quits but doesnt change the preference. I was wondering if you know the code to change the setting in the energy saver with applescript.