rubier 发表于 2009-4-23 16:11:09

VISTA 中如何实现自动唤醒sleep/Hibernate???

VISTA 中如何实现自动唤醒sleep/Hibernate???如何设置鼠标在当前位置或某坐标每隔一段时间点击一次??高手????3Q

rubier 发表于 2009-4-23 17:32:40

求教高手了!!!!!

thesnow 发表于 2009-4-23 19:57:28

sleep状态,程序全部在内存中,冻结运行。只是系统内核在正常运行/Hibernate 情况下,内存中所有数据会写入磁盘,并关闭计算机。

zhangjianfir1 发表于 2009-4-23 20:37:16

TheSnow老大,我也想知道休眠与睡眠如何唤醒呢,请教了

rubier 发表于 2009-4-24 09:58:12

高手   速度来啊

rubier 发表于 2009-4-24 10:24:15

鼠标动作自己已学习完成了,只求助如何吹唤醒sleep/Hibernate????

maxkingmax 发表于 2009-4-24 16:20:10

这个应该是硬件级的问题,软件应该不能解决,不知道用有网络唤醒功能的网卡行不行!

rubier 发表于 2009-4-25 22:41:49

利用shutdown(32)可以进sleep,shutdown(64)可以进hibernate,就是不知道什么命令可以唤醒的.,有高手的请指示一下...

sensel 发表于 2009-4-25 23:26:43

我的意见同3楼和7楼。
程序都被强制暂停运行了,还有什么办法可以执行唤醒动作呢?就像程序都退出了,你还想让它执行某函数?

78391493 发表于 2009-4-26 13:05:59

sleep状态,程序全部在内存中,冻结运行。只是系统内核在正常运行/Hibernate 情况下,内存中所有数据会写入磁盘,并关闭计算机。
thesnow 发表于 2009-4-23 19:57 http://www.autoitx.com/images/common/back.gif
没有错sleep状态下任何程序都无法执行,MS自家的也是一样,这种状态完全靠硬件唤醒。
hibernate状态是把内存中的数据写到硬盘再执行关机操作,下次开机时恢复。

rubier 发表于 2009-4-28 11:52:52


没有错sleep状态下任何程序都无法执行,MS自家的也是一样,这种状态完全靠硬件唤醒。
hibernate状态是把内存中的数据写到硬盘再执行关机操作,下次开机时恢复。
78391493 发表于 2009-4-26 13:05 http://www.autoitx.com/images/common/back.gif
绝对可以唤醒的,只是没找到方法,比如Task Scheduler/Pwrtest 等都可以唤醒机器的,Task Sheduler 是机器自带的,Pwrtest 是一个软体,就是不知道用什么命令来实现这些。

abendessen 发表于 2009-5-17 19:45:49

我也好想知道怎么唤醒机器.请高手指点啊

aronglai 发表于 2009-9-29 13:45:52

Here you are.


#include <date.au3>

;===============================================================================
;
; Description:      Sets a wakeup time to wake it up if the system / computer is hibernating or standby
; Parameter(s):   $Hour   - Hour Values    : 0-23
;                  $Minute - Minutes Values: 0-59
;                  $Day    - Days Values    : 1-31    (optional)
;                   $Month   - Month Values    : 1-12   (optional)
;                   $Year   - Year Values    : > 0   (optional)
;
; Requirement(s):   DllCall
; Return Value(s):On Success - 1
;                   On Failure - 0 sets @ERROR = 1 and @EXTENDED (Windows API error code)
;
; Error code(s):   http://msdn.microsoft.com/library/default....error_codes.asp
;
; Author(s):      Bastel123 aka Sebastian
; Note(s):          -
;
;===============================================================================
func SetWakeUpTime($Hour,$Minute,$Day=@mday,$Month=@mon,$Year=@YEAR)

$SYSTEMTIME = DllStructCreate("ushort;ushort;ushort;ushort;ushort;ushort;ushort;ushort")
$lpSYSTEMTIME = DllStructGetPtr($SYSTEMTIME)
$LOCALFILETIME=DllStructCreate("dword;dword")
$lpLOCALFILETIME = DllStructGetPtr($LOCALFILETIME)
$DueTime=DllStructCreate("dword;dword")
$lpDueTime=DllStructGetPtr($DueTime)

DllStructSetData($SYSTEMTIME, 1, $Year)
DllStructSetData($SYSTEMTIME, 2, $Month)
DllStructSetData($SYSTEMTIME, 3, _DateToDayOfWeek($Year,$Month,$Day)-1)
DllStructSetData($SYSTEMTIME, 4, $Day)
DllStructSetData($SYSTEMTIME, 5, $Hour)
DllStructSetData($SYSTEMTIME, 6, $Minute)
DllStructSetData($SYSTEMTIME, 7, 0)
DllStructSetData($SYSTEMTIME, 8, 0)

$result = DllCall("kernel32.dll", "long", "SystemTimeToFileTime", "ptr", $lpSystemTime, "ptr", $lpLocalFileTime)
If $result = 0 Then
    Local $lastError = DllCall("kernel32.dll", "int", "GetLastError")
    SetExtended($lastError)
    SetError(1)
    Return 0
EndIf
$result = DllCall("kernel32.dll", "long", "LocalFileTimeToFileTime", "ptr", $lpLocalFileTime, "ptr", $lpLocalFileTime)
If $result = 0 Then
    Local $lastError = DllCall("kernel32.dll", "int", "GetLastError")
    SetExtended($lastError)
    SetError(1)
    Return 0
EndIf
$result = DllCall("kernel32.dll", "long", "CreateWaitableTimer", "long", 0, "long", True, "str", "")
If $result = 0 Then
    Local $lastError = DllCall("kernel32.dll", "int", "GetLastError")
    SetExtended($lastError)
    SetError(1)
    Return 0
EndIf
DllCall("kernel32.dll", "none", "CancelWaitableTimer", "long",$result)

DllStructSetData($DueTime, 1, DllStructGetData($LocalFILETIME, 1))
DllStructSetData($DueTime, 2, DllStructGetData($LocalFILETIME, 2))

$result = DllCall("kernel32.dll", "long", "SetWaitableTimer", "long",$result, "ptr", $lpDueTime, "long", 1000, "long", 0, "long", 0, "long", true)
If $result = 0 Then
    Local $lastError = DllCall("kernel32.dll", "int", "GetLastError")
    SetExtended($lastError)
    SetError(1)
    Return 0
EndIf
return 1
EndFunc



;===============================================================================
;
; Description:      Set the computer in Hibernate or Standby Status
; Parameter(s):   $Mode   - Suspend mode    : True=Hibernate, False=Suspend
;                  $Force- Force-Mode    : True=the system suspends operation immediately
;                                              False=FALSE, the system broadcasts a PBT_APMQUERYSUSPEND event to each application to request permission to suspend operation   
;
; Requirement(s):   DllCall
;
; Author(s):      Bastel123 aka Sebastian
; Note(s):          If the system does not support hibernate use the standby mode          -
;
;===============================================================================
Func SetSuspend($mode=False,$force=true)
    $result = DllCall("PowrProf.dll", "long", "SetSuspendState", "long",$mode, "long",$force, "long", false)
EndFunc







SetWakeUpTime(@HOUR,@min+6); wakeup the system in 6 minutes from now

SetSuspend(); go to hibernate mode

weizhangya 发表于 2010-1-21 17:03:42

楼上的很强
页: [1]
查看完整版本: VISTA 中如何实现自动唤醒sleep/Hibernate???