P大的防重复运行最好用了#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
WinActivate("My GUI")
DllCall("kernel32.dll", "long", "CreateMutex", "int", 0, "int", 1, "str", "649ABCDF-3188-3A68-9E4A-69045B5B6B7A")
$last = DllCall("kernel32.dll", "int", "GetLastError")
If $last[0] = 183 Then Exit
Example1()
;示例 1
Func Example1()
Local $msg
GUICreate("My GUI") ; 创建一个居中显示的 GUI 窗口
GUISetState(@SW_SHOW) ; 显示一个空白的窗口
; 运行界面,直到窗口被关闭
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
GUIDelete()
EndFunc ;==>Example1
|