霸道总裁 发表于 2016-5-24 16:34:06

[工具] 文本多余空行空格清理



http://attach.52pojie.cn/forum/201603/16/110426fillag91xlglikk1.png

http://attach.52pojie.cn/forum/201603/16/110426z39j7xr7rn77bzcb.png



百度网盘下载地址:

pan.baidu.com/s/1gfwK47p   密码:9ckt   



程序使用代码:

#NoTrayIcon
#PRE_icon=C:\WINDOWS\system32\SHELL32.dll|-15
#PRE_Compression=4
#PRE_UseUpx=n
#PRE_Res_LegalCopyright=Copyright (C) gamewfj@吾爱
#PRE_Res_requestedExecutionLevel=None
#PRE_Res_Field=ProductName|
#PRE_Res_Field=编译日期|%Date%
#PRE_Res_Field=声明|AU3制作的程序可能会被误报,请斟酌
Global Const $GUI_EVENT_CLOSE = -3
Opt("GUIOnEventMode", 1)
$Form1 = GUICreate("多余空行空格清理", 340, 561, 192, 124)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
$Edit1 = GUICtrlCreateEdit("", 10, 40, 315, 500)
$Button1 = GUICtrlCreateButton("处理", 10, 10, 75, 25)
GUICtrlSetOnEvent(-1, "Button1Click")
$Label = GUICtrlCreateLabel("", 100, 10, 175, 25)
GUISetState(@SW_SHOW)
While 1
    Sleep(100)
WEnd
Func Button1Click()
    $s1 = GUICtrlRead($Edit1)
    $s1 = StringRegExpReplace($s1, '\h+', '') ;替换空格
    $s1 = StringRegExpReplace($s1, '[\r\n]+', @CRLF);多个换行替换成一个
    GUICtrlSetData($Edit1, $s1)
    ClipPut($s1)
    GUICtrlSetData($Label, '已处理并将结果放入剪切板')

EndFunc   ;==>Button1Click
Func Form1Close()
    Exit
EndFunc   ;==>Form1Close



狸子离 发表于 2016-5-24 20:27:10

牛逼的不像人类

呃呃呃001 发表于 2016-5-24 23:47:16

来试试能不能用吧。。感谢楼主的贡献

霸道总裁 发表于 2016-6-1 19:29:21

收藏了,谢谢分享

张凯峰 发表于 2016-6-2 22:37:05

谢谢,我喜欢。

霸道总裁 发表于 2016-6-3 19:53:18

通过百度找的论坛,看了几篇帖子,真心都不错!

245658491sasa 发表于 2016-6-9 13:58:42

感谢分享~期待更多的分享~

霸道总裁 发表于 2016-6-13 23:39:49

支持楼主,感谢楼主!
页: [1]
查看完整版本: [工具] 文本多余空行空格清理