 
- 帖子
- 792
- 积分
- 1022
- 技术
- 4
- 捐助
- 0
- 注册时间
- 2021-8-30
|
2楼
发表于 2021-8-31 17:11
| 只看该作者
从别的论坛解决了:
'把一个或多个jpg、png、gif等图片文件拖到此vbs文件上
If wscript.Arguments.count=0 then
msgbox "拖拽图片文件到此vbs文件",0,"提示"
WScript.Quit
End if
for jb=0 to wscript.Arguments.count-1
strPath=wscript.Arguments(jb)
Set Shell = CreateObject("Wscript.Shell")
select case lcase(right(strPath,4))
'后缀名为4位的图片类型
case "jpeg"
Shell.Run chr(34)&strPath&chr(34)
end select
select case lcase(right(strPath,3))
'后缀名为3位的图片类型
case "jpg","png","bmp","gif"
Shell.Run chr(34)&strPath&chr(34)
end select
next
WScript.Quit |
|