找回密码
 加入
搜索
查看: 1520|回复: 5

AU3怎么做出这种效果

[复制链接]
发表于 2009-1-23 10:37:45 | 显示全部楼层 |阅读模式
请问高手们AU3怎么做这样的自定义路径的新件文件夹。

[ 本帖最后由 没有知道 于 2009-1-24 19:30 编辑 ]

本帖子中包含更多资源

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

×
发表于 2009-1-23 11:22:48 | 显示全部楼层

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("Form1", 625, 445, 193, 125)
$Input1 = GUICtrlCreateInput("", 88, 96, 217, 21)
$Button1 = GUICtrlCreateButton("Button1", 312, 88, 75, 25, 0)
GUISetState(@SW_SHOW)

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                         Case  $Button1
                                                     $var = FileSelectFolder("请选择一个文件夹:", "", 7)
                                                     If Not @error Then
                                                         GUICtrlSetData($Input1, $var) 
                                                     EndIf
        EndSwitch
WEnd


應該是這樣子吧
发表于 2009-1-23 11:45:07 | 显示全部楼层
使用 FileSelectFolder ( "对话框提示文本", "根目录" [, 标志 [, "起始目录"]] )
根目录 文件树的根目录。使用 "" 表示以桌面为根目录。
标志 1 = 显示“新建文件夹”按钮

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("自定义文件夹路径", 625, 445, 193, 125)
$Input1 = GUICtrlCreateInput("", 88, 96, 217, 21)
$Button1 = GUICtrlCreateButton("浏览", 325, 93, 75, 25, 0)
GUISetState(@SW_SHOW)

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case  $Button1
                   $var = FileSelectFolder("请选择一个文件夹:", "", 7)
                        If Not @error Then
                   GUICtrlSetData($Input1, $var) 
                EndIf
        EndSwitch
WEnd
 


[ 本帖最后由 958806868 于 2009-1-23 11:46 编辑 ]
 楼主| 发表于 2009-1-23 14:07:43 | 显示全部楼层
非常感谢,偶去试试
发表于 2009-1-26 15:21:55 | 显示全部楼层
学习了 非常谢谢
发表于 2012-1-13 15:28:09 | 显示全部楼层
新手學習,感謝了...
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-10-1 01:26 , Processed in 0.087205 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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