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

如何增加文件类型

[复制链接]
发表于 2009-6-3 13:36:41 | 显示全部楼层 |阅读模式
本帖最后由 botanycc 于 2009-6-3 15:12 编辑

$t ="1"
ShellExecute($t&".txt")

比如目录中有1.txt和1.jpg这样只能打开txt类型文件,我想再增加如jpg,可以做到吗
不要再写条jpg的ShellExecute
发表于 2009-6-3 15:06:38 | 显示全部楼层
#include <Array.au3>
dim $t,$file,$a
$t ="1"
$file = ".txt-.jpg"
$a=StringSplit($file,"-")
For $i=1 To 2
ShellExecute($t&$a[$i])
Next
Exit
用数组可以达到你要的效果
 楼主| 发表于 2009-6-3 15:12:20 | 显示全部楼层
谢谢,ok了
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-4-28 09:38 , Processed in 0.068249 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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