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

[AU3基础] 如何打开input中输入的路径【已解决】

[复制链接]
发表于 2015-1-19 00:59:22 | 显示全部楼层 |阅读模式
本帖最后由 seanlvxiaoy 于 2015-1-19 22:13 编辑

我是新手,刚接触AutoIT
我想问的是如何点击一个button来打开在input中输入的路径,大致的界面如下:

在input中输入某个局域网的IP地址(如10.64.20.54),然后点击打开,能够打开这IP下的指定的一个文件夹。
还请各位大神帮忙指点下,改如何做?

本帖子中包含更多资源

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

×
发表于 2015-1-19 01:29:03 | 显示全部楼层
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("打开", 367, 42, 289, 241)
$Input1 = GUICtrlCreateInput("10.64.20.54", 8, 8, 257, 21)
$Button1 = GUICtrlCreateButton("打开", 280, 8, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
                        ShellExecute("" & GUICtrlRead($Input1))
        EndSwitch
WEnd
发表于 2015-1-19 09:40:25 | 显示全部楼层
2楼正解~~~
发表于 2015-1-19 11:06:43 | 显示全部楼层
回复 3# austere


    这是论坛里的源码,我只是搬运一下
 楼主| 发表于 2015-1-19 22:10:43 | 显示全部楼层
回复 2# jkq920

谢谢~问题解决了
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-3 21:00 , Processed in 0.079648 second(s), 25 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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