Sleep Modus mal schnell ändern
Ab und zu muss ich mal den Sleep-Modus meines Books ändern, dazu das Skript hier:
set current_mode to last word of (do shell script "pmset -g | grep hibernatemode")
if current_mode as text = "0" then
set diame_text to "Current Mode is:
0 - Old style sleep mode, with RAM powered on while
sleeping, safe sleep disabled, and super-fast wake."
else if current_mode as text = "1" then
set diame_text to "Current Mode is:
1 - Hibernation mode, with RAM contents written to disk, system totally shut down while “sleeping,” and slower wake up, due to reading the contents of RAM off the hard drive."
else if current_mode as text = "3" then
set diame_text to "Current Mode is:
3 - The default mode on machines introduced since about fall 2005. RAM is powered on while sleeping, but RAM contents are also written to disk before sleeping. In the event of total power loss, the system enters hibernation mode automatically."
else if current_mode as text = "5" then
set diame_text to "Current Mode is:
5 - This is the same as mode 1, but it’s for those using secure virtual memory (in System Preferences -> Security)."
else if current_mode as text = "7" then
set diame_text to "Current Mode is:
7 - This is the same as mode 3, but it’s for those using secure virtual memory.
3 - The default mode on machines introduced since about fall 2005. RAM is powered on while sleeping, but RAM contents are also written to disk before sleeping. In the event of total power loss, the system enters hibernation mode automatically."
end if
display dialog diame_text buttons {"OK"} default button 1
set thelist to {"1 • Write RAM to Disk (slow but save)", "3 • Write RAM to disk and keep RAM power (faster wakeup &save)", "5 • This is the same as mode 1, but it’s for those using secure virtual memory (in System Preferences -> Security)", "7 • This is the same as mode 3, but it’s for those using secure virtual memory."}
set themode to choose from list thelist with prompt "Which hibernation do you want?"
if themode ≠ false then
set t to word 1 of (themode as text)
do shell script "pmset -a hibernatemode " & t with administrator privileges
end if
Ähnliche Themen
Comments
Pingback from Der bessere Schlaf – apfelquak
Time August 3, 2009 at 12:01 pm
[...] Verhalten aber einfach nur öfter verändern, bietet sich zum Beispiel das AppleScript von HubiononMac an. Gequakt von Piet Abgelaicht in Tutorials Quak dazu geben… | Tweet [...]
Pingback from mac | Hibernate-Mode via Applescript ändern | macfidelity
Time June 14, 2009 at 1:58 pm
[...] hand anzulegen. Will man jedoch etwas mehr bietet sich wie so oft AppleScript an …. bei Hubi gibts schon einen Grobentwurf den man so direkt nützen kann – oder aber an die eigenen [...]