站长资源脚本专栏

用来通知论坛有新贴子的hta代码

整理:jimmy2025/1/9浏览2
简介做了个用来通知论坛有新贴子的hta 把下面的代码copy到本地另存为hta双击就可以执行了,出现新帖子会在右下角冒个窗口出来通知,10s后自动关闭通知窗口 复制代码 代码如下: Blue Idea Board Watcher - By Hutia</title</div> <div class="news_infos"><div id="MyContent">做了个用来通知论坛有新贴子的hta <br><br>把下面的代码copy到本地另存为hta双击就可以执行了,出现新帖子会在右下角冒个窗口出来通知,10s后自动关闭通知窗口 <BR><U>复制代码</U> 代码如下:<BR><html> <BR><head> <BR><title>Blue Idea Board Watcher - By Hutia</title> <BR><!-- 程序设置,如果希望程序在任务栏显示,请将showintaskbar改为yes --> <BR><hta:application id="app1" singleinstance="yes" contextmenu="yes" <BR> sysmenu="yes" windowstate="normal" maximizeButton="no" minimizeButton="yes" <BR> applicationName="BlueIdeaBoardWatcher" version="1.0" innerBorder="no" <BR> caption="yes" showintaskbar="no" border="thin" /> <BR><!-- 语种 gb2312 --> <BR><meta http-equiv="content-type" content="text/html; charset="gb2312">  <BR><!-- 样式表 --> <BR><style> <BR>body, td { <BR>    margin:0px; <BR>    padding:5px; <BR>    overflow:auto; <BR>    font-size:12px; <BR>} <br><br>h3 { <BR>    font-size:14px; <BR>} <br><br>iframe { <BR>    display:none; <BR>} <BR></style> <BR><script> <BR>//******全局变量区***** <BR>// 经典论坛 > Dreamweaver & Javascript专栏 <BR>url="http://bbs.blueidea.com/forumdisplay.php?fid=1"; <br><br>// 刷新间隔 10s <BR>intervals=10000; <br><br>//初始化组件 <BR>try{ <BR>    var xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); <BR>    var adodbStream=new ActiveXObject("ADOD"+"B.St"+"ream"); <BR>}catch(e){ <BR>    document.write("<h3>加载失败,组件被禁止</h3>"); <BR>} <br><br>thisDomain=location.href.substring(0,location.href.lastIndexOf("\/")); <BR>//将上次访问的结果保存在ree中用来与下次作对比 <BR>ree=new Array(); <BR>//用于判断是否初始化完毕的变量 <BR>inited=false; <BR>//保存打开的窗口的数组 <BR>theWin=new Array(); <br><br>//初始化函数 <BR>function init(){ <BR>    startCheck(); <BR>} <br><br>//发送get请求 <BR>function startCheck(){ <BR>    xmlHttp.open("get",url,true); <BR>    xmlHttp.send(); <BR>    xmlHttp.onreadystatechange=checkState; <BR>} <br><br>//确认xmlHttp返回的结果 <BR>function checkState(){ <BR>    if (xmlHttp.readyState==4){ <BR>        if (xmlHttp.status==200){ <BR>            //解码获得返回值 <BR>            var strHTML=b2s(xmlHttp.responseBody); <BR>            var iStart=strHTML.search(/<table cellspacing=0 cellpadding=0 width="99%" border=0>/i); <BR>            var iEnd=strHTML.indexOf("\r\n<\/table>\r\n",iStart); <BR>            strHTML=strHTML.substring(iStart,iEnd); <BR>            try{ <BR>                f1.document.open(); <BR>                f1.document.clear(); <BR>                f1.document.write(strHTML); <BR>                f1.document.close(); <BR>            }catch(e){} <BR>            //将返回值中的链接改成绝对地址 <BR>            for(var i=0;i<f1.document.links.length;i++){ <BR>                f1.document.links[i].href=f1.document.links[i].href.replace(thisDomain,"http://www.blueidea.com/bbs"); <BR>            } <BR>            var result=new Array(); <BR>            try{ <BR>                var theTable=f1.document.all.tags("TABLE")[1]; <BR>                for(var i=1;i<theTable.rows.length;i++){ <BR>                    strU=theTable.rows[i].cells[3].firstChild.href; <BR>                    strT=theTable.rows[i].cells[3].firstChild.innerHTML; <BR>                    strC=theTable.rows[i].cells[6].innerText; <BR>                    if(inited){ <BR>                        if(ree[strU]!=strC){ <BR>                            ree[strU]=strC; <BR>                            result[strU]=strT; <BR>                        } <BR>                    }else{ <BR>                        ree[strU]=strC; <BR>                    } <BR>                } <BR>                inited=true; <BR>                for(var i in result){ <BR>                    popupWin(i,result[i]); <BR>                } <BR>            }catch(e){} <BR>        } <BR>        setTimeout(startCheck,intervals); <BR>        return(false); <BR>    } <BR>} <br><br>//弹出窗口 <BR>function popupWin(strURL,strText){ <BR>    var mx=screen.availWidth; <BR>    var my=screen.availHeight; <BR>    var w=200; <BR>    var h=150; <br><br>    theRow=d1.insertRow(0); <BR>    theCell=theRow.insertCell(); <BR>    theCell.innerHTML="<li><a target=\"_blank\" href=\""+strURL+"\">"+strText+"</a>"; <br><br>    strHTML="<html><head><title>"+strText+"</title>"; <BR>    strHTML+="<style>body{margin:0px;padding:6px;background-Color:#D0FFD0;overflow:auto;}\r\n"; <BR>    strHTML+="div{width:100%;height:100%;overflow:hidden;text-overflow:ellipsis;"; <BR>    strHTML+="text-indent:12px;border:#999 1px solid;cursor:hand;color:#005500;}</style>"; <BR>    strHTML+="<body onload=\"setTimeout('window.close();',10000);\">"; <BR>    strHTML+="<div onclick=\"window.open('"+strURL+"');window.close();\">"; <BR>    strHTML+=strText; <BR>    strHTML+="</div></body></html>"; <BR>    for(var i=0;i<theWin.length;i++){ <BR>        if(theWin[i].closed){ <BR>            var n=parseInt(my/120); <BR>            var l=parseInt(i/n)+1; <BR>            var strModal="dialogWidth="+w+"px;dialogHeight="+h+"px;dialogLeft="+(mx-w*l)+"px;dialogTop="+(my-h*(i%n+1)); <BR>            theWin[i]=showModelessDialog("about:blank",strText,strModal); <BR>            theWin[i].document.open(); <BR>            theWin[i].document.clear(); <BR>            theWin[i].document.write(strHTML); <BR>            theWin[i].document.close(); <BR>            theWin[i].focus(); <BR>            return(false); <BR>        } <BR>    } <BR>    var n=parseInt(my/120); <BR>    var l=parseInt(i/n)+1; <BR>    var strModal="dialogWidth="+w+"px;dialogHeight="+h+"px;dialogLeft="+(mx-w*l)+"px;dialogTop="+(my-h*(i%n+1)); <BR>    theWin[i]=showModelessDialog("about:blank",strText,strModal); <BR>    theWin[i].document.open(); <BR>    theWin[i].document.clear(); <BR>    theWin[i].document.write(strHTML); <BR>    theWin[i].document.close(); <BR>    theWin[i].focus(); <BR>    return(false); <BR>} <br><br>function b2s(b){ <BR>    adodbStream.Type=1;//1=adTypeBinary <BR>    adodbStream.Open(); <BR>    adodbStream.write(b); <BR>    adodbStream.position=0; <BR>    adodbStream.Type=2; <BR>    adodbStream.charset="gb2312"; <BR>    //adodbStream.charset="_autodetect_all"; <BR>    var re=adodbStream.readText(); <BR>    adodbStream.close(); <BR>    return(re); <BR>} <br><br>window.attachEvent("onload",init); <br><br></script> <BR></head> <br><br><body> <BR><h3>Latest:</h3> <BR><table id=d1></table> <BR><iframe id="f1"></iframe> <BR></body> <BR></html><BR></div> </div> </div> <div class="share"> </div> <div class="nextinfo"> <p>上一篇:<a href="/3g/1/169387.html" title="NCC Tools(never code counter tools) V1.0.1发布代码-代码统计工具">NCC Tools(never code counter tools) V1.0.1发布代码-代码统计工具</a></p> <p>下一篇:<a href="/3g/1/169389.html" title="个人学习之作 hta <font color=red>原创</font>">个人学习之作 hta <font color=red>原创</font></a></p> </div> <div class="otherlink"> <h2>最新资源</h2> <ul> <li><a href="/3g/1/623703.html" title="群星《奔赴!万人现场 第2期》[FLAC/分轨]">群星《奔赴!万人现场 第2期》[FLAC/分轨]</a></li> <li><a href="/3g/1/623702.html" title="群星《奇妙浪一夏 (上海迪士尼度假区音乐">群星《奇妙浪一夏 (上海迪士尼度假区音乐</a></li> <li><a href="/3g/1/623701.html" title="群星《奇妙浪一夏 (上海迪士尼度假区音乐">群星《奇妙浪一夏 (上海迪士尼度假区音乐</a></li> <li><a href="/3g/1/623700.html" title="【古典音乐】詹姆斯·高威《季节》1993[WA">【古典音乐】詹姆斯·高威《季节》1993[WA</a></li> <li><a href="/3g/1/623699.html" title="贝拉芳蒂《卡里普索之王》SACD[WAV+CUE]">贝拉芳蒂《卡里普索之王》SACD[WAV+CUE]</a></li> <li><a href="/3g/1/623698.html" title="小骆驼-《草原狼2(蓝光CD)》[原抓WAV+CUE">小骆驼-《草原狼2(蓝光CD)》[原抓WAV+CUE</a></li> <li><a href="/3g/1/623697.html" title="群星《欢迎来到我身边 电影原声专辑》[32">群星《欢迎来到我身边 电影原声专辑》[32</a></li> <li><a href="/3g/1/623696.html" title="群星《欢迎来到我身边 电影原声专辑》[FL">群星《欢迎来到我身边 电影原声专辑》[FL</a></li> <li><a href="/3g/1/623695.html" title="雷婷《梦里蓝天HQⅡ》 2023头版限量编号低">雷婷《梦里蓝天HQⅡ》 2023头版限量编号低</a></li> <li><a href="/3g/1/623694.html" title="群星《2024好听新歌42》AI调整音效【WAV分">群星《2024好听新歌42》AI调整音效【WAV分</a></li> </ul> </div> </div> <div class="sidebar"> <div class="cloud"><h2 class="hometitle">一句话新闻</h2><a href="/3G/1/604673.html"><ul>高通与谷歌联手!首款骁龙PC优化Chrome浏览器发布<br><br>高通和谷歌日前宣布,推出首次面向搭载骁龙的Windows PC的优化版Chrome浏览器。<br>在对骁龙X Elite参考设计的初步测试中,全新的Chrome浏览器在Speedometer 2.1基准测试中实现了显著的性能提升。<br>预计在2024年年中之前,搭载骁龙X Elite计算平台的PC将面世。该浏览器的提前问世,有助于骁龙PC问世就获得满血表现。<br>谷歌高级副总裁Hiroshi Lockheimer表示,此次与高通的合作将有助于确保Chrome用户在当前ARM兼容的PC上获得最佳的浏览体验。</ul></a></div> <div class="cloud"><h2 class="hometitle">标签云</h2><ul><a href="/search.asp?key=1080P高清&m=1">1080P高清<span>(5)</span></a><a href="/search.asp?key=高清电影&m=1">高清电影<span>(5)</span></a><a href="/search.asp?key=百度云盘&m=1">百度云盘<span>(5)</span></a><a href="/search.asp?key=网盘下载&m=1">网盘下载<span>(4)</span></a><a href="/search.asp?key=破解软件&m=1">破解软件<span>(4)</span></a><a href="/search.asp?key=绿色软件&m=1">绿色软件<span>(4)</span></a><a href="/search.asp?key=磁力链接&m=1">磁力链接<span>(3)</span></a><a href="/search.asp?key=强度天梯&m=1">强度天梯<span>(3)</span></a><a href="/search.asp?key=福利资源&m=1">福利资源<span>(2)</span></a><a href="/search.asp?key=王者荣耀&m=1">王者荣耀<span>(2)</span></a><a href="/search.asp?key=黑钻活动&m=1">黑钻活动<span>(2)</span></a><a href="/search.asp?key=WPS会员&m=1">WPS会员<span>(2)</span></a><a href="/search.asp?key=刷图排行&m=1">刷图排行<span>(1)</span></a><a href="/search.asp?key=网盘限速&m=1">网盘限速<span>(1)</span></a><a href="/search.asp?key=鬼灭之刃&m=1">鬼灭之刃<span>(1)</span></a><a href="/search.asp?key=免费韩国漫画&m=1">免费韩国漫画<span>(1)</span></a><a href="/search.asp?key=宫本重做&m=1">宫本重做<span>(1)</span></a><a href="/search.asp?key=免费动漫&m=1">免费动漫<span>(1)</span></a></ul></div> </div> <div class="sidebar"> 友情链接:<a href="http://www.imxmx.com/" title="杰晶网络" target="_blank">杰晶网络</a> <a href="/" title="DDR爱好者之家" target="_blank">DDR爱好者之家</a> <a href="http://www.nqxw.com/" title="南强小屋" target="_blank">南强小屋</a> <a href="http://www.paidiu.com/" title="黑松山资源网" target="_blank">黑松山资源网</a> <a href="http://www.dyhadc.com/" title="白云城资源网" target="_blank">白云城资源网</a> <a href="/sitemap1.xml">站点地图</a> <a href="/sitemap.xml">SiteMap</a> </div> </article> <footer> <p>Design by <a href="http://m.ddrfans.com">DDR爱好者之家</a> <a href="http://m.ddrfans.com">http://m.ddrfans.com</a></p> </footer> <script src="/images3g/nav.js"></script> <script type="text/javascript"> jQuery.noConflict(); jQuery(function() { var elm = jQuery('#left_flow2'); var startPos = jQuery(elm).offset().top; jQuery.event.add(window, "scroll", function() { var p = jQuery(window).scrollTop(); jQuery(elm).css('position', ((p) > startPos) ? 'fixed' : ''); jQuery(elm).css('top', ((p) > startPos) ? '0' : ''); }); }); </script> </body> </html>