存档

2008年11月19日 的存档

< %
‘ASP获取文章列表
function getHTTPPage(url)
dim Http
set Http=server.createobject("MSXML2.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
set http=nothing
if err.number<>0 then err.Clear
end function
 
Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3 [...]

十一 19th, 2008 | Filed under ASP, VBscript

实现功能:
1.预算剩余时间
2.预测剩余进度
3.转换大小
4.自动调整比列
5.显示转换所有时间
6.显示调整所用时间
7.显示征途所有时间

下面给出程序源代码(r.vbs)

oh=640 ‘最大高度
op=10 ‘运行完等待时间,默认1000,即1秒
 
Function Mappath(v)
Mappath=fso.getAbsolutePathName(v)
End Function
 
Sub Convert
imgnum=fpo.files.count
wscript.echo "图片批量转换工具 1.0 By 苗启源"&vbCrlf&String(60,"=")
imgsta=timer()
imgi=1
for each file in fpo.files
if ucase(fso.getExtensionName(file))="JPG" Then
imgedit=timer()
wscript.echo "开始"&file.name&"转换…"
jpeg.open file
owidth=jpeg.originalwidth
oheight=jpeg.originalheight
[...]

十一 19th, 2008 | Filed under VBscript