AutoIt3(au3)源码-字符转换工具

本文分享了AutoIt3(Au3)编程中的一款字符转换工具的源码,详细解析了其工作原理和使用方法,帮助读者理解如何在AutoIt3中进行字符编码与解码操作。
摘要由CSDN通过智能技术生成

字符转换工具,仿牛族字符转换

;没有设置错误陷阱,仿牛族字符转换.因为牛族老是被金山灭掉,所以就自己仿了个.功能简单只是Ascii与char的互转而已.
;#Region**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_OutFile=字符转换.exe
#AutoIt3Wrapper_Run_Tidy=y
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiEdit.au3>
#include <array.au3>
 
 
#Region ### START Koda GUI section ### Form=d:\程\字符转换\字符转换.kxf
$Form1_1 = GUICreate("字符转换", 623, 538, 192, 114, BitOR($GUI_SS_DEFAULT_GUI, $WS_SIZEBOX, $WS_THICKFRAME))
$Edit1 = GUICtrlCreateEdit("", 8, 8, 601, 225);ID=3
;GUICtrlSetData(-1, "Edit1")
$Button1 = GUICtrlCreateButton("Ascii to Char ↓", 88, 248, 113, 41, $BS_MULTILINE);ID=4
$Edit2 = GUICtrlCreateEdit("", 8, 304, 601, 225);ID=5
;GUICtrlSetData(-1, "Edit2")
$Button2 = GUICtrlCreateButton("清空", 368, 248, 105, 41);ID=6
$Button4 = GUICtrlCreateButton("退出", 504, 248, 105, 41);ID=7
$Button3 = GUICtrlCreateButton("Char to Ascii ↑", 224, 248, 113, 41);ID=8
$Label1 = GUICtrlCreateLabel("分隔符:", 24, 248, 43, 17);ID=9
$Input1 = GUICtrlCreateInput("", 16, 264, 57, 21);ID=10 分隔符
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
 
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
             
        Case $Button1;Ascii to Char
             
            $NumOfLine = "";存储输入的数据
            $string = "";输出
            $splitflag = GUICtrlRead(10, 0)
             
            For $x = 0 To _GUICtrlEdit_GetLineCount(3) - 1
                $NumOfLine = _GUICtrlEdit_GetLine(3, $x)
                $array = StringSplit($NumOfLine, $splitflag, 1);此时$NumOfLine[0]=数组元素的总数,
                _ArrayDelete($array, 0);所以用_ArrayDelete函数将$NumOfLine[0]的值删除
                _ArrayAdd($array, "13") ;为实现换行,添加一个换行符至$array数组末尾.
                 
                For $a In $array
                    If $a <> "" Then
                        If $a <> "13" Then
                            $string = $string & Chr($a)
                        Else
                            $string = $string & @CRLF
                        EndIf
                    EndIf
                    GUICtrlSetData(5, $string)
                Next
            Next
             
        Case $Button2;清空
            GUICtrlSetData(3, "")
            GUICtrlSetData(5, "")
            GUICtrlSetData(10, "")
        Case $Button3;Char to Ascii
             
            $string = ""
            $NumOfLine = ""
             
            For $x = 0 To _GUICtrlEdit_GetLineCount(5)
                 
                $NumOfLine = StringStripWS(StringStripCR(_GUICtrlEdit_GetLine(5, $x)), 8)
                 
                For $a = 1 To StringLen($NumOfLine)
                    $string = $string & Asc(StringMid($NumOfLine, $a)) & " "
                Next
                $string = $string & @CRLF
                GUICtrlSetData(3, $string)
            Next
        Case $Button4;退出
            Exit
    EndSwitch
WEnd

AutoIt软件的源代码来的。可以用vc6来编译。 AutoIt 3.2.13.7.1 汉化版 AutoIt v3 是用以编写并生成具有 BASIC 语言风格的脚本程序的免费软件,它被设计用来在Windows GUI(用户界面)中进行自动操作。通过它可以组合使用模拟键击、鼠标移动和窗口/控件操作等来实现自动化任务,而这是其它语言所无法做到或尚无可靠方法实现的(比如VBScript和SendKeys)。 AutoIt 最初是为PC(个人电脑)的“批量处理”而设计,用于对数千台PC进行(同样的)配置,不过随着v3版本的到来它也很适合用于家庭自动化和编写用以完成重复性任务的脚本。 AutoIt 可以做的事: 执行 Windows 及 DOS 下的可执行文件 模拟击键动作(支持大多数的键盘布局) 模拟鼠标移动和点击动作。 对窗口进行移动、调整大小和其它操作。 直接与窗口的“控件“交互(设置/获取 文字、移动、关闭,等等) 配合剪贴板进行剪切/粘贴文本操作 对注册表进行操作 不同于 AutoIt v2,新的v3版本含有更多的标准语法——类似于VBScript和BASIC——而且现在支持更复杂的表达式、用户函数、循环以及脚本编写老手们所期待的其它所有内容。 正如前一个版本一样,AutoIt 被设计得尽可能小,并且不用依赖外部DLL文件或添加注册表项目即可独立运行。使用 Aut2Exe 这个工具即可把脚本文件编译为可独立运行的文件。 此外我们还更新了 AutoIt 的 ActiveX 和 DLL 版本——AutoItX ,与v2版本不同的是,这是个组件化的语言(COM 同一DLL文件中的标准DLL函数)。AutoItX 将使得您可以加入一些AutoIt 独有的特性到您最常用的脚本语言或程序设计语言中去!请查看 AutoItX 的帮助文档(开始 \ 所有程序 \ AutoIt v3 \ Extras \ AutoItX \ AutoItX Help File)以获得更多信息和示例。 最重要的是,AutoIt 将继续是免费的——不过如果您打算支持我们花在此工程和网站主机上的时间、费用以及所作努力的话,那么您可以到AutoIt 的 主页 上进行捐赠。 AutoIt 在线文档 http://www.autoit.net.cn/Doc/?sid=GQCCpg
au3反编译源码 myAut2Exe - The Open Source AutoIT Script Decompiler 2.9 ======================================================== *New* full support for AutoIT v3.2.6++ :) ... mmh here's what I merely missed in the 'public sources 3.1.0' This program is for studying the 'Compiled' AutoIt3 format. AutoHotKey was developed from AutoIT and so scripts are nearly the same. Drag the compiled *.exe or *.a3x into the AutoIT Script Decompiler textbox. To copy text or to enlarge the log window double click on it. Supported Obfuscators: 'Jos van der Zande AutoIt3 Source Obfuscator v1.0.14 [June 16, 2007]' , 'Jos van der Zande AutoIt3 Source Obfuscator v1.0.15 [July 1, 2007]' , 'Jos van der Zande AutoIt3 Source Obfuscator v1.0.20 [Sept 8, 2007]' , 'Jos van der Zande AutoIt3 Source Obfuscator v1.0.22 [Oct 18, 2007]' , 'Jos van der Zande AutoIt3 Source Obfuscator v1.0.24 [Feb 15, 2008]' , 'EncodeIt 2.0' and 'Chr() string encode' Tested with: AutoIT : v3. 3. 0.0 and AutoIT : v2.64. 0.0 and AutoHotKey: v1.0.48.5 The options: =========== 'Force Old Script Type' Grey means auto detect and is the best in most cases. However if auto detection fails or is fooled through modification try to enable/disable this setting 'Don't delete temp files (compressed script)' this will keep *.pak files you may try to unpack manually with'LZSS.exe' as well as *.tok DeTokeniser files, tidy backups and *.tbl (<-Used in van Zande obfucation). If enable it will keep AHK-Scripts as they are and doesn't remove the linebreaks at the beginning Default:OFF 'Verbose LogOutput' When checked you get verbose information when decompiling(DeTokenise) new 3.2.6+ compiled Exe Default:OFF 'Restore Includes' will separated/restore includes. requires ';<AUT2EXE INCLUDE-START' comment to be present in the script to work Default:ON 'Use 'normal' Au3_Signature to find start of script' Will uses the normal 16-byte start signature to detect the start of a
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值