标题: [游戏娱乐] 混編桌面點擊遊戲測試(沒完成的) [打印本页]
作者: Taurus 时间: 2022-6-14 00:04 标题: 混編桌面點擊遊戲測試(沒完成的)
本帖最后由 Taurus 于 2022-6-14 00:22 编辑
數年前我寫的混編腳本 , 寫到半途荒廢沒有繼續寫 , 內含幾種腳本互相傳遞參數
代碼把圖片一併編寫進去 , 不產生臨時文件(只在一部電腦編寫 , 其他電腦可能html會出現移位 , 如果出現移位問題請回報一下)
注意 , 需要關閉腳本的話 , 桌面右上角會出現紅色移動式按鈕
(腳本太長超過字數限制 , 下面會切開三段發文)- /<!--::[MIX Script]//*
- cls
- @echo off&setlocal enabledelayedexpansion&mode con: cols=45 lines=1&title testing&color 0a
- set icons=20
- set Gamemode=Y
- set Bload=9
- set oldBload=!Bload!
- set load=^-^\^|^/^-^\^|^/&set/a a=!random!%%4
- set load=!load:~%a%,4!
- set/p= Step 1/4 <nul
- call :getrandom 0
- call :getrandom !icons!
- set MYMARK=[%TIME::=-%-!VarRD[0]!-%random% ]
- set MYMARK=!MYMARK:.=-!
- title Taurus's Script !MYMARK!
- cls
- set/p= Step 2/4 <nul
- call :loadicon
- for /f "skip=3 tokens=1-9* delims= " %%a in ('tasklist /v /fi "windowtitle eq Taurus's Script !MYMARK!"') do (
- call :loadicon
- if "%%a"=="cmd.exe" set MYPID=%%b
- )
- title [PID:!MYPID!]
- set strA=%%%n
- cls
- set/p= Step 3/4 <nul
- for /l %%i in (1,1,!icons!) do (
- call :loadicon
- set/a str=!random!%%2+1
- set MYMARK=[%TIME::=-%-!VarRD[%%i]!-%random% ]
- set MYMARK=!MYMARK:.=-!
- set MYMARK2=!MYMARK: =!
- set process%%i=Taurus's Script{Child}!MYMARK!-[%%i]
- start /min "" Wscript -e:jscript "%~s0" /notwait "cmd /c title Taurus's Script{Child}!MYMARK!-[%%i]^&for /f !strA! in ('echo !str!,!MYMARK2!,!Gamemode!^^|mshta "%~s0"') do echo get!strA!"
- )
- start /min "" Wscript -e:jscript "%~s0" /Monitor "!MYPID!" "%~s0"
- :lp
- set/a n=0
- set killlist=
- cls
- call set/p= Step 4/4 <nul
- call :loadicon
- for /f "skip=3 tokens=1-9* delims= " %%a in ('tasklist /v /fi "windowtitle eq Taurus's Script{Child}*"') do (
- call :loadicon
- if "%%a"=="cmd.exe" (
- set taskprocess=%%j&&set taskprocess=!taskprocess: =!
- set tasknub=!taskprocess:*-[=!&&set tasknub=!tasknub:]=!
- call set process=%%process!tasknub!: =%%
- if not "!process!"=="" if "!taskprocess!"=="!process!" (
- set PID[!tasknub!]=%%b
- call set killlist=!killlist!%%PID[!tasknub!]%%,
- set/a n+=1
- )
- )
- )
- set killlist=!killlist:~0,-1!
- if not "!n!"=="!icons!" goto :lp
- if not "!Gamemode!" == "Y" call :bossmsg
- :back
- cls
- if "!Gamemode!" == "Y" (
- set/p key= Testing boss mode? [Y/N] :_
- if /i "!key!" == "Y" (call :bossmsg&goto :jumpout)
- if /i "!key!" == "N" (goto :jumpout3)
- goto :back
- )
- :jumpout
- cls
- set nuber1= ◢█ █ █ █ █ ███
- set nuber2= ◢██◣ █ █ ◢◤ ◢◤ ◢◤ ████
- set nuber3= ◢██◣ █ █ █◤ ◥◣ █ █ ◥██◤
- set nuber4= ◢ █ █ █ █ █ ████ █ █
- set nuber5= ████ █ ███◣ █ █ █ ◥██◤
- set nuber6= ◢██◣ █ ███◣ █ █ █ █ ◥██◤
- set nuber7= ████ █ ◢◤ ◢◤ █ █
- set nuber8= ◢██◣ █ █ ◢██◤ █ █ █ █ ◥██◤
- set nuber9= ◢██◣ █ █ █ █ ◥███ █ ◥██◤
- set nuber0= ◢██◣ █ █ █ █ █ █ █ █ ◥██◤
- for /l %%i in (1,1,29) do (
- set/a W=45-%%i,H=1+%%i
- if !H! gtr 8 set H=8
- mode con: cols=!W! lines=!H!
- )
- set/p=!nuber%Bload%!<nul
- :bosslp
- for /f "tokens=1-3 delims= " %%a in ('taskkill /f /fi "windowtitle eq taurus-HTA-ICONs*"') do if "%%c"=="PID" set/a Bload-=1
- if "!Bload:~0,1!"=="-" set Bload=0
- if "!Bload!" lss "!oldBload!" start /min "" Wscript -e:jscript "%~s0" /voice "!Bload!" & set oldBload=!Bload!
- if "!Bload!" lss "1" cls&set/p=!nuber0!<nul&ping/n 2 127.1>nul&goto :jumpout2
- cls&call set/p=%%nuber!Bload!%%<nul
- goto :bosslp
- :jumpout2
- for /l %%i in (16,1,45) do (
- set/a H-=1
- if !H! lss 1 set H=1
- mode con: cols=%%i lines=!H!
- )
- :jumpout3
- cls
- set/p= Click [Enter] to kill any ICONs
- taskkill /f /im wscript.exe >nul 2>nul
- taskkill /f /im mshta.exe >nul 2>nul
- exit
- :bossmsg
- set ttimes=0
- start /min "" Wscript -e:jscript "%~s0" /killlist "!killlist!"
- start /min "" Wscript -e:jscript "%~s0" /voice "BOSS MODE"
- goto :eof
- :getrandom
- set lptime=%1
- if "!lptime!" lss "1" (
- set lptime=1&set VarRD=VarRD[0]
- ) else (
- set lptime=%1&set VarRD=VarRD[%%N%%]
- )
- for /l %%i in (1,1,!lptime!) do (
- call :loadicon
- set N=%%i
- for /f "delims=" %%X in ('CScript -Nologo -e:jscript "%~s0" /getrandom 100000000000000') do call set !VarRD!=%%X
- )
- goto :eof
- :loadicon
- set/p=!load:~0,1!<nul
- set load=!load:~1!!load:~0,1!
- goto :eof
- -->
- <script>window.resizeTo(1,1);</script>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <hta:application border="dialog" innerBorder="no" maximizebutton="no" scroll="no" MinimizeButton="no" caption="no" ID="oHTA" SysMenu="no" icon="%windir%\system32\cmd.exe">
- <meta http-equiv="Content-Type" content="text/html">
- <html>
- <head>
- <title>Taurus's Script</title>
- <style type="text/css">
- body{
- position:fixed;
- visibility:hidden;
- }
- div{
- font-size: 16px;
- font-family:pmingliu;
- position:absolute;
- overflow:hidden;
- }
- #exitbutter{
- position:absolute;
- overflow:hidden;
- font-family:Arial;
- font-size:86px;
- background-color:#660000;
- border-style:solid;
- color:#CC0000;
- height:99px;
- width:99px;
- }
- #X{
- font-family:Arial;
- font-size:21px;
- color:#FFFFFF;
- }
- </style>
- <script laguage="javascript">
- try{
- var fso= new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(0);
- var BatStr=fso.ReadLine();
- var Gamemode=(BatStr.split(' ')[BatStr.split(' ').length-1]);
- var Batcode=(BatStr.split(' ')[BatStr.split(' ').length-2]);
- BatStr=(BatStr.split(' ',1));
- if ( Gamemode != "Y" ) {Gamemode="N"}
- }
- catch (e) {alert ("Error fso");}
- var ws = new ActiveXObject("WScript.Shell");
- var Gamestart=0;
- var killnub="off"
- if ( BatStr == 1 || BatStr == 2 || BatStr == 3 ) {
- BatStr=BatStr;
- } else {
- BatStr=1;
- }
- if ( Gamemode == "Y" ) {
- if ( BatStr != 3 ) {
- bossmsg = setInterval('callback()',1);
- }
- }
复制代码
作者: Taurus 时间: 2022-6-14 00:07
- var ws = new ActiveXObject("WScript.Shell");
- var SW = window.screen.width-98;SH = window.screen.height-84;
- var endW =window.screen.width-99+55;endH =-80;
- var oldX=-1;oldY=-1;goy=0;gox=0;Cutpoint=0;markW=0;markH=0;Xtakepoint=0;Ytakepoint=0;point=0;PX=SW/2;PY=SH/2;nx=0
- var EColor="#FF0000#EE0000#DD0000#CC0000#BB0000#AA0000#990000#880000#770000#660000#770000#880000#990000#AA0000#BB0000#CC0000#DD0000#EE0000";
- DColor="#FF0F0F#FF3F0F#FF6F0F#FF9F0F#FFCF0F#FFFF0F#CFFF0F#9FFF0F#6FFF0F#3FFF0F#0FFF0F#0FFF3F#0FFF6F#0FFF9F#0FFFCF#0FFFFF#0FCFFF#0F9FFF#0F6FFF#0F3FFF#0F0FFF#3F0FFF#6F0FFF#9F0FFF#CF0FFF#FF0FFF#FF0FCF#FF0F9F#FF0F6F#FF0F3F"
- BAT = "4.1,0,0,▓,f$3,,,,c0$,1.07,,,$,0.6,,,$,1.07,0.82,,$,0.57,,,$,0,,,$,0.07,0.74,,80$,1,,,$,0.5,,,$,1,0.65,,$,0.5,,,$,0.07,0.36,,$,0.5,,,$,1,,,$0.7,0.59,0.5,,000080$,1,,,$,2,,,$,2.5,,,$,3,,,$,4,,,$,5,,,$,6,,,$,7,,,$,7.2,,,$4.3,0.06,0.25,,f$,0.42,,,$0.7,7.2,0.5,,0$,6.6,,,$,5.7,,,$0.5,7.9,1,,c0$,10.1,,,$,9,,,$2,1.05,1.3,●,808000$,0.75,1.15,,$,1.45,,,ffff00$1,2.78,1.95,▊,80$,,2.35,,$2,1.62,0.84,|,0$,1.6,,,$,1.45,1,-,$,,0.96,,$,1.39,,,$,,1,,$,1.58,1.35,|,$,1.54,,,$,1.4,1.54,-,$,,1.5,,$,1.38,1.35,|,$,1.34,,,$3,0.87,0.54,-,ffff00$,0.92,,,$,0.95,0.89,,f$,0.85,,,$0.5,5.88,5.25,▊,80$,5.6,,,$,5.45,6.9,▓,808000$,5.35,,,$1,3.35,4,,f$,1.65,,,$,1.85,,,$2,1.12,1.24,|,0$,1.08,,,$,1.01,,,ffff00$,0.97,,,$,1,1.48,-,0$,,1.44,,$1,1.7,2.8,▓,808000$,1.2,3.3,,$,1.03,3.7,,f$,1.3,2.75,,808000$,0.58,2.85,,f$,,2.75,,$,1.83,2.26,,808000$,1.91,,,$,1.22,1.55,,f$2.8,0.74,0.32,-,$,,0.38,,$,0.5,0.35,,0$,0.41,,,f$,0.47,0.7,,0$,0.53,0.63,,$,0.46,,,808000$2.5,0.57,0.69,|,0$2.8,0.35,,-,80$,,0.77,,f$2.5,0.51,0.66,,$1,0.9,2.3,▓,808000$,0.7,2.9,,f$,,2.2,,$,1.05,1.95,,$1.5,1.48,1.6,|,$,1.57,,,$,1.56,,,$,1.9,1.2,,$,1.94,,,$,1.64,1.68,-,$,,1.62,,$0.3,8.4,10.32,▓,ffff00$,8.44,9,,808000$0.26,7.88,13.8,,ffff00$,8.92,,,$,8.58,,,$,9.95,9.6,,$,9.75,,,$,9.65,,,$,9.55,,,$,9.45,,,$,8.25,12,,$,11.25,15.5,,$,,14,,$,,13.4,,$,13.15,13.8,,0$1.9,1.7,1.48,-,$,,1.5,,$,1.9,1.55,,$,,1.57,,$,2.1,1.34,,$,,1.38,,$,,0.98,,$,,0.95,,$,1.8,0.65,,808000$,1.9,,,$,2.1,1.3,,$,,1.25,,$,,1.2,,$,,1.17,,$,1.9,1.47,,$,,1.43,,$,,1.39,,$1.5,2.65,2.36,|,0$,2.7,,,$,2.93,1.95,,$,2.95,,,$,2.65,1.15,,$,2.7,,,$1.9,2.13,1.35,-,$,1.88,0.75,,f$,,0.8,,$,2.08,1.05,,$,,1.1,,$,1.9,,,$,,1.05,,$1.4,2.43,1.55,|,808000$,2.48,,,$1.9,1.9,1.15,-,f$,1.7,,,$,1.5,,,$,1.4,,,$0.3,12.65,9,▓,808000$1.4,3.16,1.85,|,0$,3.12,,,$,2.92,1.3,,$,2.86,,,$0.8,4.35,1.87,▓,f$,5.2,2.68,,$1.4,2.86,2.5,|,0$,2.92,,,$0.8,5.3,4.68,▓,f$,4.3,5.2,,$,1.68,5.1,,$,5,,,$,5.2,2.65,,$,5,2,,$3.2,0.85,0.02,-,$,0.83,,,$1.25,2.36,1.23,,$,,1.13,,$,,1.18,,$,,1.11,,$1.9,1.49,0.5,,80$,1.52,,,$,1.49,0.65,,$1.2,3.45,1.65,|,0$0.9,4.45,4.55,▓,f$,,1.8,,$1.9,1.8,0.68,-,808000$,1.88,,,$,,0.66,,$,1.78,1.2,,ffff00$,1.58,1.24,,$,1.62,,,$,1.33,,,$,,1.2,,$0.3,12.9,11.1,▓,0$,,11.4,,$,12.3,11.1,,f$,,11.4,,$1.3,3.19,1.3,,$,3.45,2.1,,$,3.19,2.85,,$2.9,0.6,0.82,-,0$4.1,0.4,0.44,,f$,0.24,0.4,,"
- TXT = "3,0,,▓,80$,0.82,,,$,,0.8,,c0$,,1.06,,$5.4,0,,,f$,,0.18,,$3,1.52,0,|,c0$,,0.7,,$,,1.1,,$,1.56,0,,$,1.6,,,$,1.67,,,0$,,0.7,,$,,1.08,,$,1.55,0,,$,,0.7,,$,,1.08,,$,1.48,0,,c0$,,0.7,,$,,1.1,,$,0.03,0,,f$,,0.7,,$,,1.1,,$,0.08,0,,0$,0.28,,,$,0.48,,,$,0.68,,,$,0.88,,,$,1.08,,,$,1.28,,,$5,0,0.1,▓,f$0.25,,0,,0$,0.2,,,$,1.8,,,$,1.9,,,$,2.4,,,$,2.5,,,$,3,,,$,3.5,,,$,4,,,$,4.5,,,$,7,,,$,6.3,,,$,8.8,,,$,9.6,,,$,11,,,$,11.7,,,$,13.5,,,$,14.2,,,$,16.5,,,$,15.85,,,$,18.45,,,$,,0.8,,f$,15.95,,,$,13.7,,,$,11.2,,,$,8.9,,,$,6.38,,,$,3.9,,,$,1.8,,,$,0,,,$,19.8,,,0$,,0,,6$,20.5,0.8,,71654b$,19.8,0,,6$,,23.3,,0$3.5,0.08,0.73,_,c0$,0.38,,,$,0.8,,,$,0.95,,,$0.25,18.4,23.3,▓,0$3.5,0.09,0.77,_,$,0.38,,,$,0.8,,,$,0.98,,,$0.25,0.4,23.9,▓,9$,0,23.3,,$,0.4,,,80$2.5,1.4,0,-,0$,1.1,,,$,0.25,,,$,0.45,,,$,0.25,0.15,,$,0.45,,,$,0.25,0.45,,$,0.45,,,$,0.25,0.66,,$,0.45,,,$,0.65,,,$,0.85,,,$,1.05,,,$,1.25,,,$,1.4,,,$,0.25,0.81,,$,0.45,,,$,0.65,,,$,0.85,,,$,1.05,,,$,1.25,,,$,1.4,,,$,0.25,0.96,,$,0.45,,,$,0.65,,,$,0.85,,,$,1.05,,,$,1.25,,,$,1.4,,,$,0.25,1.11,,$,0.45,,,$,0.65,,,$,0.85,,,$,1.05,,,$,1.25,,,$,1.4,,,$,0.25,1.35,,$,0.45,,,$,0.25,1.5,,$,0.45,,,$1.26,1.7,0.8,▓,f$0.26,18,1.4,,80$,,1.9,,$,,2.4,,$0.25,19.9,22.9,,c0$,19.4,23.2,,$,19.2,,,$3,1.67,1.7,|,0$,1.3,1.07,_,$,,1.09,,$0.23,22,25.6,▓,"
- if (BatStr != 3) {
- CColor=DColor;
- var X = getrandom(1,SW);Y = getrandom(1,SH);
- var RW = getrandom(1,SW);RH = getrandom(1,SH);
- window.moveTo(RW,RH);
- var Speed = getrandom(2,10);
- setInterval("ChangeICON(BatStr)",0);
- starC = setInterval('starcolor("ALL")',50);
- show=setInterval("move()",1);
- } else {
- CColor=EColor
- show2=setInterval("ChangeICON(BatStr)",0);
- }
- function move(j,k,l){
- if( RH==Y && RW==X ){
- markW = getrandom(1,SW);
- markH = getrandom(1,SH);
- Speed = getrandom(2,10);
- if ( l == 1) {
- Speed = getrandom(7,10);
- markW = j;
- markH = k;
- }
- if(markW>X){Xtakepoint = markW-X;}
- if(markW<X){Xtakepoint = X-markW;}
- if(markH>Y){Ytakepoint = markH-Y;}
- if(markH<Y){Ytakepoint = Y-markH;}
- }
- point+=1;
- if(Xtakepoint>Ytakepoint){
- Cutpoint = Xtakepoint/Speed+1;
- Xnub=Cutpoint-point;Ynub=point;
- }else{
- Cutpoint = Ytakepoint/Speed+1;
- Ynub=Cutpoint-point;Xnub=point;
- }
- Xhalf=Xtakepoint/Cutpoint;Yhalf=Ytakepoint/Cutpoint;
- goX=Math.round(Xhalf*2/Cutpoint*Xnub);
- goY=Math.round(Yhalf*2/Cutpoint*Ynub);
- if(markW>X){X = X+goX;nx+=1}
- if(markW<X){X = X-goX;nx+=1}
- if(markH>Y){Y = Y+goY;nx+=1}
- if(markH<Y){Y = Y-goY;nx+=1}
- window.moveTo(X,Y);
- if (( point>Cutpoint ) || (oldX==X && oldY==Y)){
- RW=X;RH=Y;point=0;
- }
- oldX=X;oldY=Y;
- if( l == 1){
- if ((Y==PY&&nx==1)||(X==PX&&nx==1)||(X==markW&&Y==markH)){
- window.moveTo(PX,PY);
- clearInterval(show2);
- setTimeout("show=setInterval('move()',1)", 10000);
- }
- }
- nx=0;
- }
- function move1(i){
- try {clearInterval(onbutter);} catch (e) {}
- if(i=="on"){
- try {clearInterval(starC);} catch (e) {}
- document.getElementById("exitbutter").style.background = "#660000";
- document.getElementById("exitbutter").style.color = "#CC0000";
- if (endH<0){
- endW-=11;endH+=16;
- window.moveTo(endW,endH);
- onbutter=setInterval('move1("on")',1);
- return;
- }
- CColor="#CCCCCC#660000"
- starC = setInterval("starcolor()",150);
- }
- if(i=="off"){
- if (endH>-80){
- endW+=11;endH-=16;
- window.moveTo(endW,endH);
- onbutter=setInterval('move1("off")',1);
- return;
- }
- document.getElementById('X').style.visibility = "visible";
- try {clearInterval(starC);} catch (e) {}
- CColor=EColor
- starC = setInterval('starcolor("off")',20);
- }
- }
- function starcolor(i){
- CColorA=CColor.slice(0,7);CColorB=CColor.slice(7);
- if (i=="off"){
- document.getElementById('exitbutter').style.background = CColorA;
- }
- if (i!="ALL"){
- document.getElementById('exitbutter').style.color = CColorA;
- } else {
- document.getElementById('iconNON').style.background = CColorA;
- }
- CColor=(CColorB+CColorA);
- }
- function ChangeICON(i){
- if ( i == 1) {j="BAT";k="TXT";l="iconNON";m="iconexit";n="98";o="84";p="2";}
- if ( i == 2) {j="TXT";k="BAT";l="iconNON";m="iconexit";n="84";o="98";p="1";}
- if ( i == 3) {j="iconexit";k="BAT";l="iconNON";m="TXT";}
- if ((i != 3)&&(Gamestart != 0)) Changesize(k,'-');
- document.getElementById(m).style.visibility = "hidden";
- document.getElementById(k).style.visibility = "hidden";
- document.getElementById(j).style.visibility = "visible";
- if (i != 3){
- document.getElementById(l).style.visibility = "visible";
- SW =window.screen.width-n;
- SH =window.screen.height-o;
- setTimeout("Changesize(k,'+')", 8000);
- BatStr=p;
- } else {
- if (Gamestart == 0) {
- window.resizeTo(99,99);
- window.moveTo(endW,endH);
- clearInterval(show2);
- Gamestart=1;
- starC = setInterval('starcolor("off")',20);
- } else {
- if (i == "off") {
- move1("off");
- } else {
- document.getElementById('X').style.visibility = "hidden";
- move1("on");
- }
- }
- return;
- }
- Gamestart=1;
- }
复制代码
作者: Taurus 时间: 2022-6-14 00:08
- function Changesize(i,j){
- Face=i;
- if (j=='-') {
- K=99;strA=("K>0");strB=("K--");
- if (Face=='BAT'){Face='TXT'}else{Face='BAT'}
- CColor=DColor;
- starC = setInterval('starcolor("ALL")',50);
- non=('visible');
- }else{
- K=0;strA=("K<99");strB=("K++");
- try {clearInterval(starC);} catch (e) {}
- non=('hidden');
- }
- while (eval(strA)) {
- strJ=K-13;
- if (strJ<1) {strJ=1};if (strJ>85) {strJ=85};
- if (Face=='BAT') window.resizeTo(strJ,K);
- if (Face=='TXT') window.resizeTo(K,strJ);
- eval(strB);
- }
- CW = (document.body.clientWidth); CH = (document.body.clientHeight);
- document.getElementById('iconNON').style.visibility = non;
- }
- function gettimes(){
- if ((Gamestart != 0)&&(killnub=="on")){
- ws.Run("cmd /c title Taurus-HTA-ICONs"+Batcode+"&pause" ,0);
- }
- }
- function getrandom(min,max){
- return Math.floor(Math.random()*(max-min+1))+min;
- }
- function KillAll(){
- ws.Run("taskkill /f /im mshta.exe",0);
- window.close();
- }
- function callback(callback){
- try{
- var fso2 = new ActiveXObject("Scripting.FileSystemObject");
- fso2.GetStandardStream(1).WriteLine("callback");
- }
- catch (e) {
- clearInterval(bossmsg);
- clearInterval(show);
- musicpath = (fso2.GetSpecialFolder("0")+"\\Media\\ding.wav");
- musicpath=musicpath.replace(/\\/g,"\\\\" )
- sound(musicpath);
- RH=Y; RW=X; killnub="on";
- if (BatStr==1) ChangeICON("1");
- show2=setInterval("move(PX,PY,'1')",1);
- }
- }
- function sound(i){
- document.all.bgs.src=(i);
- }
- function Printico(X){
- pic = eval(X).split("$");
- for(i=0;i<pic.length;i++){
- str = (pic[i].toString());
- str = str.split(",");
- if (str[4].length == 1) {
- str[4]=(str[4]+str[4]+str[4]+str[4]+str[4]+str[4]);
- }
- if (str[4].length == 2) {
- str[4]=(str[4]+str[4]+str[4]);
- }
- for(J=0;J<5;J++){
- if (str[eval(J)].length == "") {
- str[eval(J)]=(eval("oldstr"+(J)));
- }
- }
- oldstr0=(str[0]);oldstr1=(str[1]);oldstr2=(str[2]);oldstr3=(str[3]);oldstr4=(str[4]);
- ico = document.createElement("div");
- ico.style.fontSize = (str[0]+"em");
- ico.style.paddingLeft = (str[1]+"em");
- ico.style.paddingTop = (str[2]+"em");
- ico.innerHTML = (str[3]);
- ico.style.color = ("#"+str[4]);
- element = document.getElementById(X);
- element.appendChild(ico);
- }
- }
- </script>
- </head>
- <bgsound id=bgs src="" loop=1>
- <body id=bodyA onMouseOver=ChangeICON(BatStr);gettimes();>
- <div id=BAT style="width:6.2em;height:5.4em;overflow:hidden;float:left;background-color:#808080;margin-left:-18.5px;margin-top:-15px;visibility:visible;"></div>
- <div id=TXT style="width:5.4em;height:6.2em;overflow:hidden;float:left;background-color:#808080;margin-left:-19px;margin-top:-15px;visibility:hidden;"></div>
- <div id=iconNON style="width:5.4em;height:6.2em;overflow:hidden;float:left;background-color:#ffffff;margin-left:-19px;margin-top:-15px;visibility:visible;"></div>
- <div id=iconexit style="width:6.2em;height:6.2em;overflow:hidden;float:left;background-color:#CC0000;margin-left:-18px;margin-top:-15px;visibility:hidden;">
- <input id=exitbutter style="margin-left:0px;" type=button value="×" onclick=setInterval("KillAll()",1); onMouseOut=move1("off");>
- </div>
- <div id=X style="width:1.2em;height:1.2em;overflow:hidden;float:left;margin-left:-2px;margin-top:63px;visibility:visible;">×</dir>
-
- <input style="margin-left:0px;margin-top:200px;position:absolute;visibility:visible;" id=runbutton type="button" value="ChangeICON" onClick="ChangeICON(BatStr)" >
- <style onload="Printico('BAT');Printico('TXT');"</style>
- </body>
- </html>
- */
- /*<!--::[JS Converter]*/
- var ws = new ActiveXObject("WScript.Shell");
- if (WScript.Arguments.length<2){
- ScriptHELP ()
- WScript.Quit();
- }
- var Tcom = (WScript.Arguments(1));
- if (WScript.Arguments(0)=== "/runhta"){
- ScriptHTA();
- WScript.Quit();
- }
- if (WScript.Arguments(0)=== "/help"){
- ScriptHELP ();
- WScript.Quit();
- }
- if (WScript.Arguments(0)=== "/getuac"){
- ScriptUAC ();
- WScript.Quit();
- }
- if (WScript.Arguments(0)=== "/notwait"){
- notwait ();
- WScript.Quit();
- }
- if (WScript.Arguments(0)=== "/getrandom"){
- getrandom();
- WScript.Quit();
- }
- if (WScript.Arguments(0)=== "/Monitor"){
- var batpath = (WScript.Arguments(2));
- while(0<10){
- ProcessMonitor();
- }
- }
- if (WScript.Arguments(0)=== "/killlist"){
- killPID ();
- WScript.Quit();
- }
- if (WScript.Arguments(0)=== "/voice"){
- talking (WScript.Arguments(1));
- WScript.Quit();
- }
- WScript.Echo(" Parameters Error :\n"+
- "\n"+
- "["+WScript.Arguments(0)+"] is not Recognized Command \n"+"\n"
- );
- ScriptHELP ()
- WScript.Quit();
- function talking (i) {
- new ActiveXObject("Sapi.SpVoice").Speak(i);
- }
- function killPID () {
- var killlist = (WScript.Arguments(1));
- count = 0;
- while (killlist.split(',').length > count) {
- str = ("taskkill /f /PID "+killlist.split(',')[count]);
- GetObject("winmgmts:").Get("Win32_Process.Handle='" + killlist.split(',')[count] + "'").Terminate();
- count++;
- }
- }
- function getrandom () {
- var nub = (WScript.Arguments(1));
- str = Math.floor(Math.random()*nub)
- WSH.Echo (str)
- }
- function notwait () {
- var str = (Tcom);
- ws.Run(str,0);
- WScript.Quit();
- }
- function ScriptHTA () {
- var str = (Tcom);
- ws.Run(str,0,true);
- WScript.Quit();
- }
- function ProcessMonitor() {
- WScript.Sleep (500);
- try{
- var proc = GetObject("winmgmts:").Get("Win32_Process.Handle='" + Tcom + "'");
- if (proc.Caption == "cmd.exe") {
- //WScript.Echo("ok");
- }
- } catch (e) {
- ws.Run("cmd /c echo 3|mshta "+batpath,0);
- WScript.Quit();
- }
- }
- function ScriptUAC () {
- Inlink=Tcom.replace(/\"/g,"" )
- link=(WScript.ScriptFullName);
- if (link===Inlink){
- var shell = new ActiveXObject('shell.application');
- shell.ShellExecute( Inlink , 'UAC', '', 'runas', 0);
- } else {
- WScript.Echo(
- "ERROR \n"+
- "\n"+
- "For safety reasons :\n"+
- "1.\/[\/getuac]is not elevated privilege to External Scripts \n"+
- "2.\/The \[Input values\] must match at \[JS requirements\] \n"+
- "===============================================\n"+
- "\n"+
- "Input variable : \["+Inlink+"\]\n"+
- "JS requirements: \["+link+"\]\n"+
- "===============================================\n"+
- "\n"+
- "Suggested input : \n"+
- "Wscript -e:jscript \"%~s0\" /getuac \"%~s0\"\n"+
- "\n"
- );
- };
- WScript.Quit();
- }
- function ScriptHELP () {
- WScript.Echo (
- "The following parameters can be used :\n"+
- "\n"+
- "[Script Grammar]================================\n"+
- "\n"+
- "wscript -e:jscript [SCRIPT PATH] [PARAMETERS] [Command line]\n"+
- "\n"+
- "[PARAMETERS]======================================\n"+
- "\n"+
- "[/runhta]\n"+
- "[/notwait]\n"+
- "[/getuac]\n"+
- "[/getrandom]\n"+
- "[/Monitor]\n"+
- "[/help]\n"+
- "\n"+
- "[Command line] example===============================\n"+
- "\n"+
- "Wscript -e:jscript \"%~s0\" /runhta \"cmd \/c echo;%str1%;%str2%^\|mshta \"%0\"\n"+
- "Wscript -e:jscript \"%~s0\" /notwait \"cmd \/c echo [HELLO WORLD]\n"+
- "Wscript -e:jscript \"%~s0\" /getuac \"%~s0\"\n"+
- "Cscript -Nologo -e:jscript \"%~s0\" /getrandom [NUB RANGE]\n"+
- "Wscript -e:jscript \"%~s0\" /Monitor [%PID%] \"%~s0\"\n"+
- "Wscript -e:jscript \"%~s0\" /help\n"+
- "\n"
- );
- WScript.Quit();
- }
- //-->
复制代码
作者: FenoX 时间: 2022-12-22 10:09
啊啊啊啊啊,我的电脑!!!
欢迎光临 批处理之家 (http://www.bathome.net/) |
Powered by Discuz! 7.2 |