本帖最后由 tubaba 于 2022-5-12 12:45 编辑 >"E:\Autoit_3.3.16.0\SciTE\..\AutoIt3.exe" "E:\Autoit_3.3.16.0\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "E:\NoScan\autoit_script\TEst\a.au3" /UserParams
+>12:39:58 启动 AutoIt3Wrapper (21.316.1639.1) 来自:SciTE.exe (3.6.2.0) 键盘:E0010804 操作系统:WIN_10/2009 CPU架构:X64 操作系统架构:X64 环境(语言:0804) 代码页:936 utf8.自动.检查:3 # 检测ascii高位字符,如果未找到则将默认编码设置为UTF8并添加BOM..
+> SciTEDir => E:\Autoit_3.3.16.0\SciTE UserDir => E:\Autoit_3.3.16.0\SciTE\AutoIt3Wrapper SCITE_HOME => E:\Autoit_3.3.16.0\SciTE SCITE_USERHOME => E:\Autoit_3.3.16.0\SciTE
>正在执行 AU3Check (3.3.16.0) 来自:E:\Autoit_3.3.16.0 输入:E:\NoScan\autoit_script\TEst\a.au3
+>12:39:58 AU3Check 结束.rc:0
>正在运行:(3.3.16.0):E:\Autoit_3.3.16.0\autoit3.exe "E:\NoScan\autoit_script\TEst\a.au3"
+>设置热键...--> 按 Ctrl+Alt+Break 重新启动或 Ctrl+BREAK 停止.
!> 以调试模式启动..
行: @error-@extended: 行语法
0001: 0-0: #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
0002: 0-0: #AutoIt3Wrapper_UseX64=n
0003: 0-0: #AutoIt3Wrapper_run_debug_mode=Y
0004: 0-0: #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
0005: 0-0: #include <MsgBoxConstants.au3>
0007: 0-0: OnAutoItExitRegister("MyTestFunc")
0008: 0-0: OnAutoItExitRegister("MyTestFunc2")
0010: 0-0: Sleep(1000)
0011: 0-0: Exit
0018: 0-0: MsgBox($MB_SYSTEMMODAL, "Exit Results 2", "Exit Message from MyTestFunc()")
0019: 0-0: EndFunc ;==>MyTestFunc2
0014: 0-0: MsgBox($MB_SYSTEMMODAL, "Exit Results 1", "Exit Message from MyTestFunc()")
0015: 0-0: EndFunc ;==>MyTestFunc
+>12:40:10 AutoIt3.exe 已结束.rc:0
+>12:40:11 AutoIt3Wrapper 完成.
>Exit code: 0 Time: 14.07
从这个流程可以看出,函数是在执行exit后,再执行"MyTestFunc2","MyTestFunc"
而且,最后注册的函数总是最先执行(与注册的顺序相反),有时,对于退出时执行函数有先后顺序这种需求的话,要特别注意这点
|