#singleinstance ;install, close.ico,close.ico menu, tray, nostandard menu, actions, add, LogOff menu, actions, add, ShutDown menu, actions, add, Restart menu, actions, add, Hibernate menu, actions, add, Suspend Menu, actions, show return Escape::exitapp LogOff: shutdown, 0 return Shutdown: shutdown, 9 return restart: shutdown, 2 return Suspend: DllCall("PowrProf\SetSuspendState", "int", 0, "int", 1, "int", 0) return Hibernate: DllCall("PowrProf\SetSuspendState", "int", 1, "int", 0, "int", 0) return /* Logoff 0 Shutdown 1 Reboot 2 Force 4 Power down 8 Suspend/Hibernate See DllCall example at the bottom of this page. ; Call the Windows API function "SetSuspendState" to have the system suspend or hibernate. ; Windows 95/NT4: Since this function does not exist, the following call would have no effect. ; Parameter #1: Pass 1 instead of 0 to hibernate rather than suspend. ; Parameter #2: Pass 1 instead of 0 to suspend immediately rather than asking each application for permission. ; Parameter #3: Pass 1 instead of 0 to disable all wake events. DllCall("PowrProf\SetSuspendState", "int", 0, "int", 0, "int", 0) */