国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 編程 > VBScript > 正文

VBS相冊(cè)生成腳本[

2019-10-26 18:08:46
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友
此腳本的功能為將一個(gè)目錄中的jpg,gif,png格式的圖片生成Html相冊(cè),頁(yè)面上的圖像只是改變顯示大小,并沒(méi)有生成縮略圖。
用到的技術(shù):Scripting.FileSystemObject,Adodb.Stream。其中得到圖片長(zhǎng)寬用了秋水無(wú)恨的Adodb.Stream取得圖像的高寬
復(fù)制代碼 代碼如下:

'///////////////////////////////////////////////
'VBS相冊(cè)生成腳本,使用方法:將此文件放在sendto目錄中(在運(yùn)行中輸入直接sendto,就可以打開(kāi)),然后在有圖片的文件夾上點(diǎn)右鍵,選擇發(fā)送到,等一下,就OK了。
'海娃 http://www.51windows.Net
'更新日期:2004-12-30
'///////////////////////////////////////////////

Set ArgObj = WScript.Arguments
Set fsoBrowse = CreateObject("Scripting.FileSystemObject")
dim cpath,imgw,imgh,pagesize,wn,hn,pagetitle,filenamestart,firstpage
cpath=ArgObj(0)'傳遞路徑
imgw = 240
imgh = 180
wn = 3
hn = 3
pagetitle = "圖片展示 - 51windows.Net"
filenamestart = "Page_"
firstpage = "index.htm"

pagetitle2 = inputbox("請(qǐng)輸入頁(yè)面標(biāo)題","請(qǐng)輸入頁(yè)面標(biāo)題",pagetitle)
if isempty(pagetitle2) = false and len(pagetitle2) > 1 then
    pagetitle = pagetitle2
end if

filenamestart2 = inputbox("請(qǐng)輸入文件名前綴","請(qǐng)輸入文件名前綴",filenamestart)
if isempty(filenamestart2) = false and len(filenamestart2) > 1 then
    filenamestart = filenamestart2
end if

firstpage2 = inputbox("請(qǐng)輸入第一頁(yè)的文件名,點(diǎn)取消按序號(hào)生成","請(qǐng)輸入第一頁(yè)的文件名",firstpage)
if isempty(firstpage2) = false and len(filenamestart2) > 1 then
    firstpage = firstpage2
else
    firstpage = ""
end if

if len(firstpage) > 0 and (right(lcase(firstpage),4)<>".htm" and right(lcase(firstpage),5)<>".html") then
    firstpage = firstpage & ".htm"
end if

imgw2 = inputbox("請(qǐng)輸入小圖的寬度","請(qǐng)輸入小圖的寬度",imgw)
if isnumeric(imgw2) and isempty(imgw2) = false then
    imgw = imgw2
end if

imgh2 = inputbox("請(qǐng)輸入小圖的高度","請(qǐng)輸入小圖的高度",imgh)
if isnumeric(imgh2) and isempty(imgh2) = false then
    imgh = imgh2
end if


wn2 = inputbox("請(qǐng)輸入每行的圖像數(shù)","請(qǐng)輸入每行的圖像數(shù)",wn)
if isnumeric(wn2) and isempty(wn2) = false then
    wn = wn2
end if
發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表

圖片精選

主站蜘蛛池模板: 浏阳市| 长垣县| 吐鲁番市| 赣榆县| 沅陵县| 嫩江县| 平度市| 阜平县| 京山县| 名山县| 黄梅县| 武鸣县| 沙坪坝区| 瓮安县| 八宿县| 左权县| 罗源县| 运城市| 岑巩县| 清河县| 揭西县| 东乡县| 玉田县| 巴中市| 聂荣县| 水富县| 堆龙德庆县| 高陵县| 密山市| 田阳县| 新建县| 永福县| 淮阳县| 蕉岭县| 洛隆县| 寿阳县| 堆龙德庆县| 绩溪县| 上栗县| 景德镇市| 惠州市|