找回密码
 加入
搜索
查看: 2010|回复: 4

请问如何将FileOpenDialog查找的路径及文件插入到GUICtrlCreateInput函数中。。。

[复制链接]
发表于 2008-10-15 17:07:06 | 显示全部楼层 |阅读模式
请问如何将FileOpenDialog查找的路径及文件插入到GUICtrlCreateInput函数中。。。

[ 本帖最后由 無☆名 于 2008-10-18 08:00 编辑 ]
发表于 2008-10-15 17:31:17 | 显示全部楼层
$filepath=FileOpenDialog("选择文件","C:\","程序文件(*.exe)",3)
       If Not @error Then
             GUICtrlSetData($Input1, $filepath)
发表于 2008-10-15 18:01:49 | 显示全部楼层
$File = FileOpenDialog("打开", "", "(*.*)")
If $File <> "" Then
        GUICtrlSetData($Input1, $File)
EndIf
发表于 2010-10-22 17:13:57 | 显示全部楼层
$source_files_name = FileOpenDialog("选择源文件", @ScriptDir & "\", "Microsoft Office Excel 工作簿(*.xls)", 1 + 2 + 4, "", $Form1)
If @error Then
    MsgBox(64, "提示", "没有选择源文件")
Else
    If StringRegExp($source_files_name, ".*\|.*") = 0 Then
        GUICtrlSetData($List1, $source_files_name)
    Else
        $files_name = StringSplit($source_files_name, "|")
        $files_dir = $files_name[1]
        For $r = 2 To UBound($files_name) - 1
            $tmp = $files_dir & "\" & $files_name[$r]
            GUICtrlSetData($List1, $tmp)
        Next
    EndIf
EndIf
发表于 2011-2-8 10:41:55 | 显示全部楼层
学习了,谢谢。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-10-2 14:37 , Processed in 0.076572 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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