国产探花免费观看_亚洲丰满少妇自慰呻吟_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ā)表

圖片精選

主站蜘蛛池模板: 夏津县| 昌黎县| 万山特区| 信阳市| 阜阳市| 上蔡县| 左云县| 邻水| 江川县| 宝鸡市| 类乌齐县| 金山区| 辉南县| 德惠市| 西盟| 黄龙县| 鄄城县| 明溪县| 新营市| 福贡县| 长丰县| 绥德县| 元谋县| 和顺县| 苍溪县| 本溪| 三明市| 赤壁市| 弥渡县| 成都市| 岗巴县| 大新县| 仁寿县| 拜泉县| 灵武市| 南阳市| 大渡口区| 洪洞县| 镇江市| 常德市| 浦县|