StrokesPlus Forum
StrokesPlus Forum
Home | Profile | Register | Active Topics
Members | Search | FAQ
 All Forums
 General Discussion
 General Discussion
 How to hybernate Computer with StrokesPlus

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List

* Forum Code is ON
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

Check here to subscribe to this topic.

T O P I C    R E V I E W
gwerdi Posted - 04/28/2014 : 10:10:52
Hi everyone.
I'm looking for a way to set my Windows XP computer to hybernate with a gesture. Anybody has a hint for me? On Google i found a command to use hybernate as a shortcut: %systemroot%\System32\rundll32.exe powrprof.dll,SetSuspendState
6   L A T E S T    R E P L I E S    (Newest First)
gwerdi Posted - 05/02/2014 : 08:52:47
Thank you for your support. I'll try out the way with a utility. Seems to be the easiest way:)
Rob Posted - 04/29/2014 : 10:58:35
Hmm, I'm not sure why that doesn't work as it seems the MSDN documentation states that's what it should do!

I'll get back to you if I have any other ideas; though you may do some searches to see if there's a small utility program you can call from S+...such as
gwerdi Posted - 04/29/2014 : 03:20:49
I just tried to set bForceCritical to false but I get the same effect.
Rob Posted - 04/28/2014 : 13:25:24
Have you tried setting the second parameter (bForceCritical) to false? The documentation isn't clear, but suggests it may cause a suspend to be invoked.
local bHibernate = true
local bForceCritical = false
local bDisableWakeEvent = false

aSetSuspendState(bHibernate, bForceCritical, bDisableWakeEvent)
gwerdi Posted - 04/28/2014 : 12:12:06
Thank you very much for your help. The script seems to work but the computer just suspends instead of hybernating. If I set the computer to hybernate manually (Shift Click on Standby) it hybernates correctly.
Rob Posted - 04/28/2014 : 11:17:39
I put this together and it works for me on Windows 8.1, though MSDN states it should work for WinXP as well:

Under Global Lua:
powrprof = alien.core.load("powrprof.dll")

gSetSuspendState = powrprof.SetSuspendState
gSetSuspendState:types{ret = 'long', abi = 'stdcall', 'long', 'long', 'long'}
function aSetSuspendState(Hibernate, ForceCritical, DisableWakeEvent)
	return gSetSuspendState(Hibernate, ForceCritical, DisableWakeEvent)

Action Lua Script:
local bHibernate = true
local bForceCritical = true
local bDisableWakeEvent = false

aSetSuspendState(bHibernate, bForceCritical, bDisableWakeEvent)

See this link for the specifics regarding the three possible parameters:

StrokesPlus Forum © 2011-2018 Rob Yapchanyk Go To Top Of Page
Snitz Forums 2000