#include <ButtonConstants.au3>
#include <GUIConstants.au3>
;判断运行参数
If $CMDLINE[0] > 0 Then
If $CMDLINE[1] = "1" Then
_R1()
Else
MsgBox(16, "错误!", "无效参数!")
Exit
EndIf
Else
_R2()
EndIf
Func _R2()
$Form1 = GUICreate("无参数出现窗口来执行", 300, 100, -1, -1)
$Label = GUICtrlCreateLabel("无参数出现窗口来执行", 5, 15, 190, 20)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Select
Case $nMsg = $GUI_EVENT_CLOSE
Exit
EndSelect
WEnd
EndFunc ;==>_R2
Func _R1()
MsgBox(0, "", "带参数这里可以直接执行么个程序。")
EndFunc ;==>_R1 |