#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("做一个界面", 316, 151, 338, 387)
$Button1 = GUICtrlCreateButton("这是第一个按钮", 32, 64, 115, 25, 0)
$Button2 = GUICtrlCreateButton("这是第二个按钮", 168, 64, 115, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$QQdir=RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\TENCENT\QQ","Install") ;定义QQ的安装路径
Run($QQdir&"QQ.exe")
Case $Button2
Exit
EndSwitch
WEnd
|