找回密码
 注册
搜索
[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
查看: 22738|回复: 3

[其他] writeloca 程序输出彩色字符

[复制链接]
发表于 2015-3-3 11:08:10 | 显示全部楼层 |阅读模式
本帖最后由 email10t 于 2015-3-6 20:57 编辑
  1. @echo off
  2. :: ax = b8h
  3. :: bx = bbh
  4. :: cx = b9h
  5. :: dx = bah
  6. :: sp = bch
  7. :: bp = bdh
  8. :: si = beh
  9. :: di = bfh

  10. setlocal

  11. if not exist "c:\windows\system32\debug.exe" goto no_debug

  12. set dq="
  13. set excla=!
  14. md temp
  15. cd temp

  16. goto :length

  17. :main
  18. echo e 0100 b8 0 13 bb %1 0 b9 %hex% ba %y% %x% bd 16 1 cd 10 b8 0 4c cd 21 >1.txt
  19. (echo rcx & echo 16 & echo n temp & echo w & echo q) >>1.txt
  20. debug<1.txt>nul
  21. echo[!str!>>echoing
  22. copy /b temp+echoing writing.com >nul
  23. del 1.txt
  24. del TEMP
  25. del echoing
  26. del $
  27. writing
  28. cd..
  29. rd/s/q temp

  30. endlocal
  31. endlocal
  32. goto :eof

  33. :hexconvert
  34. set hexstring=0123456789abcdef
  35. set /a h3=(strlen^>^>12)^&15
  36. set /a h2=(strlen^>^>8)^&15
  37. set /a h1=(strlen^>^>4)^&15
  38. set /a h0=(strlen^>^>0)^&15
  39. set hex=!hexstring:~%h1%,1!!hexstring:~%h0%,1! !hexstring:~%h3%,1!!hexstring:~%h2%,1!
  40. set /a h3=(x^>^>4)^&15
  41. set /a h2=(x^>^>0)^&15
  42. set /a h1=(y^>^>4)^&15
  43. set /a h0=(y^>^>0)^&15
  44. set x=!hexstring:~%h1%,1!!hexstring:~%h0%,1!
  45. set y=!hexstring:~%h3%,1!!hexstring:~%h2%,1!
  46. goto main

  47. :length
  48. set x=%2
  49. set y=%3
  50. set str=%4


  51. setlocal enabledelayedexpansion

  52. if not "!str:~0,1!" == "!dq!" goto returning
  53. set str=!str:~1,-1!&rem                      删除引号
  54. if not "!str!" == "" set str=!str:""=^"!&rem 反向转义
  55. :returning
  56. echo[!str!>$
  57. for /f %%@ in ("$") do set/a strlen=%%~z@-2
  58. goto hexconvert

  59. :no_debug

  60. echo 我机器上没有 debug :(
  61. goto :eof
复制代码

评分

参与人数 2技术 +2 收起 理由
CrLf + 1 感谢分享
tigerpower + 1 五颜六色我喜欢~

查看全部评分

 楼主| 发表于 2015-3-3 11:48:39 | 显示全部楼层
 楼主| 发表于 2015-3-3 19:31:17 | 显示全部楼层
  1. cmd/cwriteloca e 0 0 "hello world"
复制代码
 楼主| 发表于 2015-3-12 11:31:20 | 显示全部楼层
本帖最后由 email10t 于 2015-3-12 11:42 编辑

最近研究起了 C,学着学着就心血来潮地写了这个批处理第3方 - gBatch话说 真的很感谢 defanive ~ 他的百度空间真的是太多好康了~(怎么最近没更新了啊?)

好啦,废话不多说,来介绍这个 批处理集合工具~
其实呢,这东东里面的功能,这论坛都应该有相应的第3方了吧~
我只是把他们全都集合起来,用自己的代码实现它们~

这个exe体积14KB,功能有哪些呢?看看吧~

  1. 1、禁止用户关闭功能
  2. 2、Message Beep
  3. 3、设置本控制台的标题
  4. 4、闪动窗体
  5. 5、设置本控制台的图标功能
  6. 6、窗体置顶
  7. 7、取消窗体置顶
  8. 8、将BMP文件显示在屏幕上
  9. 9、移动光标
  10. 10、开启文件夹/文件/链接
  11. 11、延迟
  12. 12、字符计算
  13. 13、字符填充
  14. 14、以特定颜色填充输出
  15. 15、以特定的颜色输出文本
  16. 16、控制台支持鼠标
  17. 17、字串转换为大写
  18. 18、字串转换为小写
  19. 19、将ASCII转换为字符
复制代码
双击exe有英文的帮助,压缩包内有个批处理演示工具
贴代码(很久没碰批处理了,代码很烂。。)
... http://www.bathome.net/thread-17383-1-1.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|批处理之家 ( 渝ICP备10000708号 )

GMT+8, 2026-3-19 14:12 , Processed in 0.029163 second(s), 9 queries , File On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表