界面如下圖:把源代碼存為(hta)文件,因為hta文件沒有狀態欄,所以我這裡建議大家存為html文件,這樣可以在狀態欄下看到
NCC掃描的進度,我這裡把NCC的maxloop設置為3000,所以文件統計到3000的時候,會自動終止,以防文件夾中文件太多造成運行的負擔。
如果大家喜歡這樣的代碼,就請關注"NeverModules"
主要功能有-
1。可自己選擇文件夾,或者單個文件。
2。自己選擇文件後綴名進行統計
3。 outputinformation輸出的數據有:
文件個數,
文件的代碼字節數,
單詞個數,
代碼行數,
總代碼字節數
總代碼行數。
4。可以把代碼統計結果用SaveAs存為html或者txt文件。 代碼如下:<?xmlversion="1.0"encoding="UTF-8"?>
<!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml">
<head>
<title>NCCTools-http://www.never-online.net</title>
<hta:applicationid="NCC"
applicationname="NCCapplication"
border="thin"
borderstyle="normal"
caption="yes"
icon="http://www.never-online.net/images/icon.ico"
maximizebutton="no"
minimizebutton="yes"
showintaskbar="no"
singleinstance="yes"
sysmenu="yes"
version="1.01"
windowState="normal"/>
<metahttp-equiv="ImageToolbar"content="no"/>
<metaname="author"content="BlueDestiny,never-online"/>
<metaname="keywords"content="nevermodules,MozillaCSS,C#,.net,Refercence,BlueDestiny,never-online,www.never-online.net"/>
<metaname="description"content="BlueDestiny,never-online"/>
<metaname="title"content="nevercodecounter(NCC)-http://www.never-online.net"/>
<metaname="creator.name"content="GeniusLau,never-online,blueDestiny"/>
<styletype="text/css"media="all"title="Default">
body{background-color:buttonface;}
body,td,input{font:9pttahoma;}
h1{text-align:center;font-weight:bold;font-family:tahoma;font-size:16pt;}
fieldset{height:300px;}
legend{font-weight:bolder;}
.btn{border-left:4pxsolid#444;border-top:1pxsolid#444;border-bottom:1pxsolid#444;border-right:1pxsolid#444;}