找回密码
 加入
搜索
查看: 921|回复: 2

问一个选择执行的问题

[复制链接]
发表于 2009-5-22 12:51:52 | 显示全部楼层 |阅读模式
本帖最后由 botanycc 于 2009-5-22 15:43 编辑

选择1就打开1.txt,选择2就打开2.txt,这里怎么搞,帮下,谢谢
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 303, 70, 193, 125)
$Combo1 = GUICtrlCreateCombo("选择", 18, 18, 145, 25)
GUICtrlSetData(-1, "1|2")
$Button1 = GUICtrlCreateButton("打开", 190, 20, 75, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2009-5-22 14:52:28 | 显示全部楼层
Case $Button1
                                                $sCombo1 = GUICtrlRead($Combo1);读出下拉的内容
                                                FileOpen($Combo1,1);打开相应文件
 楼主| 发表于 2009-5-22 15:42:47 | 显示全部楼层
谢谢,学会了,哈哈
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-6 03:15 , Processed in 0.073517 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表