|
发表于 2016-9-26 19:07:15
|
显示全部楼层
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$type_ini= @ScriptDir & "\ini\install.ini"
$type_link=IniReadSection($type_ini,"type")
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 458, 280, 192, 124)
$Button1 = GUICtrlCreateButton($type_link[1][1], 15, 32, 100, 33)
$button2 = GUICtrlCreateButton($type_link[2][1], 129, 32, 100, 33)
$Button3 = GUICtrlCreateButton($type_link[3][1], 15, 78, 100, 33)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$binary_file = ""
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$binary_file = IniRead($type_ini, GUICtrlRead($Button1), "path", "")
Run($binary_file)
If @error Then
MsgBox(0, "无法执行", "不存在:" & $binary_file)
EndIf
Case $Button2
$binary_file = IniRead($type_ini, GUICtrlRead($Button2), "path", "")
Run($binary_file)
If @error Then
MsgBox(0, "无法执行", "不存在:" & $binary_file)
EndIf
Case $Button3
$binary_file = IniRead($type_ini, GUICtrlRead($Button3), "path", "")
Run($binary_file)
If @error Then
MsgBox(0, "无法执行", "不存在:" & $binary_file)
EndIf
EndSwitch
WEnd |
|