本帖最后由 fybhwsx 于 2014-1-10 09:16 编辑
这回彻底解决了,不是au3的问题,是电源命令问题!;电源设置
Run(@ComSpec & " /c " & 'powercfg -h off', "", @SW_HIDE);禁用休眠
Sleep(50)
;Run(@ComSpec & " /c " & 'POWERCFG /CHANGE hibernate-timeout-ac 0', "", @SW_HIDE);从不休眠
;Sleep(50)
;Run(@ComSpec & " /c " & 'POWERCFG /CHANGE hibernate-timeout-dc 0', "", @SW_HIDE);从不休眠
;Sleep(50)
Run(@ComSpec & " /c " & 'POWERCFG -SETACVALUEINDEX 381b4222-f694-41f0-9685-ff5bb260df2e fea3413e-7e05-4911-9a71-700331f1c294 0e796bdb-100d-47d6-a2d5-f7d2daa51f51 0', "", @SW_HIDE);唤醒时不需要密码
Sleep(50)
Run(@ComSpec & " /c " & 'POWERCFG -SETDCVALUEINDEX 381b4222-f694-41f0-9685-ff5bb260df2e fea3413e-7e05-4911-9a71-700331f1c294 0e796bdb-100d-47d6-a2d5-f7d2daa51f51 0', "", @SW_HIDE);唤醒时不需要密码
Sleep(50)
Run(@ComSpec & " /c " & 'POWERCFG -SETACVALUEINDEX 381b4222-f694-41f0-9685-ff5bb260df2e 238c9fa8-0aad-41ed-83f4-97be242c8f20 bd3b718a-0680-4d9d-8ab2-e1d2b4ac806d 1', "", @SW_HIDE);启用唤醒定时器
Sleep(50)
Run(@ComSpec & " /c " & 'POWERCFG -SETDCVALUEINDEX 381b4222-f694-41f0-9685-ff5bb260df2e 238c9fa8-0aad-41ed-83f4-97be242c8f20 bd3b718a-0680-4d9d-8ab2-e1d2b4ac806d 1', "", @SW_HIDE);启用唤醒定时器
Sleep(50)
Run(@ComSpec & " /c " & 'POWERCFG -SETACVALUEINDEX 381b4222-f694-41f0-9685-ff5bb260df2e 0012ee47-9041-4b5d-9b77-535fba8b1442 6738e2c4-e8a5-4a42-b16a-e040e769756e 0', "", @SW_HIDE);从不关闭硬盘
Sleep(50)
Run(@ComSpec & " /c " & 'POWERCFG -SETDCVALUEINDEX 381b4222-f694-41f0-9685-ff5bb260df2e 0012ee47-9041-4b5d-9b77-535fba8b1442 6738e2c4-e8a5-4a42-b16a-e040e769756e 0', "", @SW_HIDE);从不关闭硬盘
Sleep(50)
Run(@ComSpec & " /c " & 'POWERCFG -SETACVALUEINDEX 381b4222-f694-41f0-9685-ff5bb260df2e 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 3', "", @SW_HIDE);合上盖子关机
Sleep(50)
Run(@ComSpec & " /c " & 'POWERCFG -SETDCVALUEINDEX 381b4222-f694-41f0-9685-ff5bb260df2e 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 3', "", @SW_HIDE);合上盖子关机
Sleep(50)
Run(@ComSpec & " /c " & 'POWERCFG -SETACVALUEINDEX 381b4222-f694-41f0-9685-ff5bb260df2e 7516b95f-f776-4464-8c53-06167f40cc99 aded5e82-b909-4619-9949-f5d71dac0bcb 0', "", @SW_HIDE);显示器亮度(0)
Sleep(50)
Run(@ComSpec & " /c " & 'POWERCFG -SETDCVALUEINDEX 381b4222-f694-41f0-9685-ff5bb260df2e 7516b95f-f776-4464-8c53-06167f40cc99 aded5e82-b909-4619-9949-f5d71dac0bcb 0', "", @SW_HIDE);显示器亮度(0)
Sleep(50)
Run(@ComSpec & " /c " & 'POWERCFG -setactive 381b4222-f694-41f0-9685-ff5bb260df2e', "", @SW_HIDE);激活电源方案
|