回复 1# pyj521
给你个示例,难得看你的代码,你直接去套用吧。以下放到你的主程序目录中运行看效果.#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Include <File.au3> ;file相关的
#include<array.au3> ;与数据相关的
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("测试示例", 270, 204, 192, 114)
$Combo1 = GUICtrlCreateCombo("", 64, 48, 161, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
$Button1 = GUICtrlCreateButton("应用", 72, 88, 145, 33)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
_exe_list() ;载入数据到 combo 中
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$url = @ScriptDir&"/机号编码/"&GUICtrlRead($Combo1)
MsgBox(0,"应用路径",$url)
;~ ShellExecute($url,"","","", @SW_HIDE) ;隐藏执行一个外部程序
EndSwitch
WEnd
Func _exe_list() ;载入数据到 combo 中
$list = _FileListToArray(@ScriptDir&"/机号编码","*号机n.exe",1)
;~ _ArrayDisplay($list,"测试而以")
_ArrayDelete($list,0) ;删除数组中第一个数值
GUICtrlSetData($Combo1,_ArrayToString($list),$list[0]) ;将 数组发送到 combo中
EndFunc
支付宝id:13640701096(只是ID而以不是现在的电话)
淘宝ID:vbt风哥 给张把彩票吧 |