[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[其他] [来自Dostips]新一代鼠标第三方——Mouse.exe

今天在Dostips论坛上看到一个非常好的第三方,体积只有2KB,但能实现类似cmos甚至超越cmos的功能。
[Tips:Mouse.exe没有帮助文档,请亲自实验]
调用方法:Mouse
结果:
单击(1为左键,2为右键,不支持鼠标中键) 行 列
获取数值:Mouse > 文件
set /p Mouse=0<文件
生成方法(Win7 x64及以上):
  1. @echo off
  2. (
  3. echo.-----BEGIN CERTIFICATE-----
  4. echo.TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  5. echo.AAAAAAAAAAAAAAAAgAAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5v
  6. echo.dCBiZSBydW4gaW4gRE9TIG1vZGUuDQ0KJAAAAAAAAABQRQAATAECAAAAAAAAAAAA
  7. echo.AAAAAOAADwMLAQYAAAAAAAAAAAAAAAAAQBEAAAAQAAAAIAAAAABAAAAQAAAAAgAA
  8. echo.BAAAAAAAAAAEAAAAAAAAAFAhAAAAAgAAAAAAAAMAAAAAABAAABAAAAAAEAAAEAAA
  9. echo.AAAAABAAAAAAAAAAAAAAACAgAAA8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  10. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  11. echo.AAAAAAAAAABcIAAALAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC50ZXh0AAAA
  12. echo.ABAAAAAQAAAAAgAAAAIAAAAAAAAAAAAAAAAAACAAAGAuZGF0YQAAAFABAAAAIAAA
  13. echo.UgEAAAAEAAAAAAAAAAAAAAAAAABAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  14. echo.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABVieWB7AgAAACQjUX6UOgs
  15. echo.AAAAg8QED79F/FAPv0X+UA++RfpQuAAgQABQ6IgBAACDxBC4AAAAAOkAAAAAycNV
  16. echo.ieWB7CQAAACQuPb///9Q6GwBAACJRfy4AAAAAIlF3I1F+FCLRfxQ6FwBAACLRfiD
  17. echo.yBCD4L+D4N9Qi0X8UOhOAQAAi0XchcAPhAUAAADpnAAAAI1F9FC4AQAAAFCNReBQ
  18. echo.i0X8UOgvAQAAD7dF4IP4Ag+FcwAAAItF6IP4AbgAAAAAD5TAiUXchcAPhA8AAACL
  19. echo.RQi5AQAAAIgI6SMAAACLReiD+AK4AAAAAA+UwIlF3IXAD4QKAAAAi0UIuQIAAACI
  20. echo.CItF3IXAD4QdAAAAi0UIg8ACD79N5GaJCItFCIPAAoPAAg+/TeZmiQjpVP///4tF
  21. echo.+FCLRfxQ6JUAAADJwwAAAFWJ5YHsFAAAAJC4AAAAAIlF7LgAAAMAULgAAAEAUOh9
  22. echo.AAAAg8QIuAEAAABQ6HcAAACDxASNRexQuAAAAABQjUX0UI1F+FCNRfxQ6GEAAACD
  23. echo.xBSLRfRQi0X4UItF/FDoXf7//4PEDIlF8ItF8FDoRgAAAIPEBMnDAP8lXCBAAAAA
  24. echo./yV0IEAAAAD/JXggQAAAAP8lfCBAAAAA/yWAIEAAAAD/JWAgQAAAAP8lZCBAAAAA
  25. echo./yVoIEAAAAD/JWwgQAAAACVkICVkICVkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  26. echo.iCAAAAAAAAAAAAAAtCAAAFwgAACgIAAAAAAAAAAAAAD9IAAAdCAAAAAAAAAAAAAA
  27. echo.AAAAAAAAAAAAAAAAvyAAAMggAADVIAAA5iAAAPYgAAAAAAAACiEAABkhAAAqIQAA
  28. echo.OyEAAAAAAAC/IAAAyCAAANUgAADmIAAA9iAAAAAAAAAKIQAAGSEAACohAAA7IQAA
  29. echo.AAAAAG1zdmNydC5kbGwAAABwcmludGYAAABfY29udHJvbGZwAAAAX19zZXRfYXBw
  30. echo.X3R5cGUAAABfX2dldG1haW5hcmdzAAAAZXhpdABrZXJuZWwzMi5kbGwAAABHZXRT
  31. echo.dGRIYW5kbGUAAABHZXRDb25zb2xlTW9kZQAAAFNldENvbnNvbGVNb2RlAAAAUmVh
  32. echo.ZENvbnNvbGVJbnB1dEEAAAAA
  33. echo.-----END CERTIFICATE-----
  34. ) > "Mouse.exe"
  35. if not exist "Mouse.exe" %0
  36. Certutil -decode -f "Mouse.exe" "Mouse.exe" > nul
  37. if not exist "Mouse.exe" %0
  38. exit
复制代码
请各位利用好这么好的第三方,开创出Bat的新天地!

改进netbenton的扫雷(使用Mouse.exe)
  1. @echo off
  2. Mode Con: Cols=80 Lines=25
  3. ::在游戏过程中,输入benton可以看清所有地雷
  4. title 批处理扫地雷 之 越战清道夫   Made by netbenton from http://bbs.bathome.cn
  5. set `=!
  6. ::注意哦,这个变量很关键,
  7. set #for1=for /f "tokens=1-6" %%c in ("!u! !m! !d! !l! !n! !r!") do (
  8. set #for2=for %%k in (%%c.%%f %%c.%%g %%c.%%h %%d.%%f %%d.%%h %%e.%%f %%e.%%g %%e.%%h!) do (
  9. ::这个定义是为了缩减代码和提速
  10. setlocal enabledelayedexpansion
  11. set "ec-1= ABCDEFGHIJKLMNOP "
  12. for /l %%a in (0,1,17) do (set M%%a=!ec-1:~%%a,1!)
  13. set ec18= !ec-1! 后面还有其它字符表示[插旗]或[取旗]
  14. set ec-1= !ec-1!
  15. set ec0=■■■■■■■■■■■■■■■■■■  还有!`!dilei!`!个雷,!`!tudi!`!亩地
  16. set ec17=■■■■■■■■■■■■■■■■■■  !`!over!`!!`!say!`!
  17. set str= abcdefghijklmnop
  18. for /l %%a in (1,1,16) do set com!str:~%%a,1!=%%a
  19. set ∷=今天运气不错哦...
  20. set ①=生死由命,就放心踩吧
  21. set ②=这里都不敢动,劝你回家种田吧!
  22. set ③=团长,要看清想好呀。
  23. set ④=这里要动的话,就只有半条命了!
  24. set ⑤=探到不少雷呀,最好不要赌了
  25. set ⑥=小心呀!团长,想好呀
  26. set ⑦=危险啊!最好别动了!
  27. set ⑧=这里全是雷呀!别动!!!
  28. set n=0
  29. for %%a in (① ② ③ ④ ⑤ ⑥ ⑦ ⑧) do (set/a n+=1&set s#=!s#!★&set !s#!=%%a&set n%%a=!n!)
  30. set over=
  31. set bj=@
  32. set bj1=-1
  33. set bj@1=1
  34. set say=一个艰巨的任务开始了...
  35. for /l %%a in (0,1,17) do (set r0.%%a=#&set r17.%%a=#&set r%%a.0=#&set r%%a.17=#)
  36. :begin 重新开始
  37. color f0
  38. setlocal enabledelayedexpansion
  39. for /l %%a in (1,1,40) do (
  40.   set/a ran=!random!%%16+1
  41.   set true=
  42. for /l %%b in (1,1,16) do (
  43.   set/a ram=!random!%%16+1
  44.   if not defined true (
  45.    if not defined L!ran!.!ram! set L!ran!.!ram!=★&set true=y&set/a dilei+=1
  46.   )
  47. )
  48. )
  49. set/a tudi=16*16-dilei
  50. for /l %%a in (1,1,16) do (
  51. set/a u=%%a-1,d=%%a+1
  52. for /l %%b in (1,1,16) do (
  53.   if not defined L%%a.%%b (
  54.    set/a l=%%b-1,r=%%b+1
  55.    for /f "tokens=1-6" %%c in ("!u! %%a !d! !l! %%b !r!") do (
  56. for %%z in ("!L%%c.%%f!!L%%c.%%g!!L%%c.%%h!!L%%d.%%f!!L%%d.%%h!!L%%e.%%f!!L%%e.%%g!!L%%e.%%h!") do (set r%%a.%%b=!%%~z!)
  57.    )
  58.   )
  59. )
  60. )
  61. for /l %%a in (1,1,16) do (
  62. for /l %%b in (1,1,16) do (
  63.   if not defined r%%a.%%b set "r%%a.%%b=∷"
  64.   if not defined L%%a.%%b set L%%a.%%b=!r%%a.%%b!
  65.   set r%%a.%%b=
  66. )
  67. )
  68. set benton=set "str=!`!str!`!□"
  69. :loop 主循环
  70. for /l %%a in (1,1,16) do (
  71. set str=
  72. for /l %%b in (1,1,16) do (
  73.   if defined r%%a.%%b (
  74.      if !r%%a.%%b! equ @ (set "str=!str!▼") else (set "str=!str!!`!L%%a.%%b!`!")
  75.   ) else (
  76.      %benton%
  77.   )
  78. )
  79. set ec%%a=■!str!■
  80. )
  81. set benton=set "str=!`!str!`!□"
  82. :error 出错循环
  83. cls
  84. for /l %%a in (-2,1,18) do (for %%b in ("!ec%%a!") do echo;     !M%%a!%%~b!M%%a!)
  85. if defined over echo 游戏结束,请按回车键继续...&color 4e&pause>nul&endlocal&goto :begin
  86. if !tudi! leq 0 echo 恭喜你过关了,请按回车键继续..&color 4e&pause>nul&endlocal&goto :begin
  87. mouse > ReturnKey.ini
  88. set /p Mouse=0<ReturnKey.ini
  89. set "Mouse=%Mouse: =/%"
  90. echo.%Mouse% > ReturnKey.ini
  91. rem Nr是行,Nl是列
  92. set Click=%Mouse:~0,1%
  93. for /f "delims=/ tokens=2" %%i in (ReturnKey.ini) do set Nr=%%i
  94. for /f "delims=/ tokens=3" %%i in (ReturnKey.ini) do set Nl=%%i
  95. set /a Nr-=2
  96. set /a Nl-=10
  97. set /a Nl_2=2-%Nl%%%2
  98. set /a Nl+=%Nl_2%
  99. set /a Nl/=2
  100. set /a Nr-=1
  101. set /a Nl-=1
  102. set Coordinate=ABCDEFGHIJKLMNOP
  103. set in=!Coordinate:~%Nr%,1!
  104. set in=%in%!Coordinate:~%Nl%,1!
  105. if %Click% neq 1 set in=%in% else set in=%in%#
  106. set/a ver=0,m=com!in:~0,1!,n=com!in:~1,1!,ver=m*n
  107. if !ver! equ 0 goto :error
  108. set back=:loop
  109. :zhilp 主动或自动打开地,均使用这个子过程, 与:zhisub子过程和:auto子过程有联合循环动作,即有重入。
  110. if "!in:~2,1!" neq "" (
  111.         if "!r%m%.%n%:@=!" neq "!r%m%.%n%!" (
  112.                 for %%a in (bj!r%m%.%n%!) do (
  113.                         set r%m%.%n%=!%%a!
  114.                         set/a dilei+=%%a1
  115.                 )
  116.                 goto %back%
  117.         ) else (
  118.                 goto :error
  119.         )
  120. )
  121. if defined r%m%.%n% if "!r%m%.%n%!" equ "#" (goto :zhisub) else (goto :error)
  122. set r%m%.%n%=#
  123. set/a tudi-=1
  124. if "!L%m%.%n%!" equ "★" set over=  光荣牺牲了
  125. if "!L%m%.%n%!" equ "∷" call :auto
  126. set say=!L%m%.%n%!
  127. set say=!%say%!
  128. goto %back% 依靠变量来控制程序走向
  129. :zhisub 选择点为已经打开的数字时,自动插旗或打开地 的 子过程
  130. set back=:eof
  131. set in=
  132. set/a u=m-1,d=m+1,l=n-1,r=n+1,zh=n!l%m%.%n%!,zh@=0,zhi=0,zh#=0
  133. %#for1%
  134. %#for2%
  135.                 if defined r%%k (set/a zh!r%%k!+=1) else (set/a zhi+=1)
  136.         )
  137. )
  138. set/a zh#=zh@+zhi
  139. if !zh! equ !zh@! set in=12
  140. if !zh! equ !zh#! set in=123
  141. if not defined in goto :error
  142. %#for1%
  143. %#for2%
  144.                 for /f "tokens=1,2 delims=." %%1 in ("%%k") do (set/a m=%%1,n=%%2)
  145.                 if not defined r%%k call :zhilp 循环调用减少代码,增强自动化
  146.         )
  147. )
  148. goto :loop
  149. :auto  打开的为空地时自动打开地 的 子过程
  150. set/a u=m-1,d=m+1,l=n-1,r=n+1
  151. %#for1%
  152. %#for2%
  153.   if not defined r%%k (
  154.    set r%%k=#
  155.    set/a tudi-=1
  156.    if "!L%%k!" equ "∷" (
  157.     for /f "tokens=1,2 delims=." %%1 in ("%%k") do (set/a m=%%1,n=%%2)
  158.     call :auto 循环调用减少代码,增强自动化
  159.    )
  160.   )
  161. )
  162. )
  163. goto :eof
复制代码

TOP

本帖最后由 slimay 于 2021-8-11 00:10 编辑

回复 2# HOPE2021
不错, 不过批处理游戏已经过时了. opengl写游戏太累了,  我现在开发游戏只用虚幻引擎,或者u3d, Cocos2d. 之所以放弃opengl.是因为 GL写起来太累,太慢. 蒙皮骨骼动画,更是要自己去实现,太烧脑 果断抛弃gl开发. cmd只能命令, 简陋的体验,  just for fun.

TOP

本帖最后由 523066680 于 2021-8-11 10:09 编辑

用OpenGL的人大致为以下情况:

  • 自研游戏引擎的
  • 现成引擎功能上合适,但是有些许可协议不能接受,还得自己造
  • 所开发的专业化软件涉及到三维渲染(比如医疗),但是没有很好的现成的方案可以套用,不得不造轮子。
  • 图形艺术


看需求

职业的都转向 Vulkan/DirectX 12 了

TOP

返回列表