本帖最后由 afan 于 2009-6-30 21:51 编辑 If $CmdLine[0] > 0 Then
If $CmdLine[1] = "-C0" Then ;---待机
if StringInStr($CmdLine[2],"-T") <>0 Then
$t = StringTrimLeft($CmdLine[2],2)
msgbox(0,0,$t & ' 后进入待机')
elseif StringInStr($CmdLine[2],"-Q") <>0 Then
msgbox(0,0,'现在立即进入待机')
endif
ElseIf $CmdLine[1] = "-C1" Then ;---休眠
if StringInStr($CmdLine[2],"-T") <>0 Then
$t = StringTrimLeft($CmdLine[2],2)
msgbox(0,0,$t & ' 后进入休眠')
elseif StringInStr($CmdLine[2],"-Q") <>0 Then
msgbox(0,0,'现在立即进入休眠')
endif
ElseIf $CmdLine[1] = "-C2" Then ;---注销
if StringInStr($CmdLine[2],"-T") <>0 Then
$t = StringTrimLeft($CmdLine[2],2)
msgbox(0,0,$t & ' 后进入注销')
elseif StringInStr($CmdLine[2],"-Q") <>0 Then
msgbox(0,0,'现在立即进入注销')
endif
ElseIf $CmdLine[1] = "-C3" Then ;---关机
if StringInStr($CmdLine[2],"-T") <>0 Then
$t = StringTrimLeft($CmdLine[2],2)
msgbox(0,0,$t & ' 后进入关机')
elseif StringInStr($CmdLine[2],"-Q") <>0 Then
msgbox(0,0,'现在立即进入关机')
endif
ElseIf $CmdLine[1] = "-C4" Then ;---重启
if StringInStr($CmdLine[2],"-T") <>0 Then
$t = StringTrimLeft($CmdLine[2],2)
msgbox(0,0,$t & ' 后进入重启')
elseif StringInStr($CmdLine[2],"-Q") <>0 Then
msgbox(0,0,'现在立即进入重启')
endif
endif
EndIf
|