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

[AU3基础] 文件夹路径中含变量[已解决]

[复制链接]
发表于 2010-12-15 16:36:11 | 显示全部楼层 |阅读模式
本帖最后由 yikang8888 于 2010-12-15 16:59 编辑

我想从FTP下载一个.bmp的图片,需要下载的文件名字根据我GUI上输入的$Input2,$Input3,$Input4来判断,那么我的路路径要怎么写呢?下面这2行,感谢了
$S_Desktop = "D98-DESKTOP\$Station\$PC_Num.bmp"
        $C_Desktop = "C:\$PC_Num.bmp"


                $Station = GUICtrlRead($Input2)
        $Device_ID = GUICtrlRead($Input3)
        $PC_Num = GUICtrlRead($Input4)
        $PC_Name = $Station & "-" & $Device_ID & "-" & $PC_Num
Dim $s_ip = IniRead("ftp test.ini", "server_information", "ServerIP", "")
Dim $s_name = IniRead("ftp test.ini", "server_information", "Username", "")
Dim $s_password = IniRead("ftp test.ini", "server_information", "password", "")
$varP = Ping($s_ip, 200) ;判断网络状况是否OK,延时大于200视为fail
        if $varP Then GUICtrlSetData($msg1, "网络状况良好~~~~" & @CRLF, 1)
        $3ftp = _FTP_Open("myftp Control") ;打开FTP会话
        $conn = _FTP_Connect($3ftp, $s_ip, $s_name, $s_password) ;连接到FTP
        $huo = _FTP_DirGetCurrent($conn)
        $S_Desktop = "D98-DESKTOP\$Station\$PC_Num.bmp"
        $C_Desktop = "C:\$PC_Num.bmp"
        Else
        GUICtrlSetData($msg1, "网络有问题请检查" & @CRLF, 1)
        EndIf

评分

参与人数 1金钱 +10 收起 理由
afan + 10 感谢主动将修改帖子分类为[已解决],请继续 ...

查看全部评分

发表于 2010-12-15 16:44:13 | 显示全部楼层
$S_Desktop = "D98-DESKTOP\" & $Station & "\" & $PC_Num & ".bmp"

评分

参与人数 1金钱 +20 收起 理由
afan + 20

查看全部评分

 楼主| 发表于 2010-12-15 16:53:26 | 显示全部楼层
OK了,感谢!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-4-28 15:47 , Processed in 0.092837 second(s), 28 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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