本帖最后由 chzj589 于 2017-8-3 14:39 编辑
回复 11# bhffhzh
修改判断就行Local $CMDLINE[3]=[1,'start',2]
Local $CMDLINE[3]=[1,'start',2]
If $CMDLINE[0] <> 0 Then
If $CMDLINE[1] = "start" Then
$strConfigINI = @ScriptDir & "\IPMonConfig.ini"
$SmtpServer = IniRead($strConfigINI, "MailConfig", "SmtpServer", "") ; 无法读取
$FromName = @IPAddress1 ; 名字来自谁是电子邮件的发送 ;可以读
$Body = "服务器被重启,请注意检查!" ;可以读
Else
MsgBox(16, "错误!", "无效参数!")
Exit
EndIf
Else
MsgBox(16, "错误!", "本程序需要带参数运行")
Exit
EndIf
MsgBox(0, 0, $SmtpServer & @CRLF & $FromName & @CRLF& $Body)
|