问题描述
我的 AutoIt 脚本发送一个点击和按键列表来自动化旧的封闭源应用程序.
My AutoIt script sends a list of clicks and key-presses to automate an old closed source application.
它有错误,所以我想知道如何调试 AutoIt 脚本.或者至少输出脚本的行号(以显示实时执行的代码).
It has bugs so I want to know how I can debug AutoIt scripts. Or at least output the script's line number (to show code executed in real time).
推荐答案
在 SciTE 中,从工具中选择跟踪:添加跟踪线".如果没有选择任何内容,这将向每行添加一个 ConsoleWrite.如果您先选择一些代码,它会将 ConsoleWrite 行添加到您选择的内容中.
In SciTE from Tools select "Trace: Add trace lines". This will add a ConsoleWrite to each line if nothing is selected. If you select some code first it will add ConsoleWrite lines to what you have selected.
如果您在编译的代码中遇到错误,您可以在编译之前将其添加到脚本的顶部.当它出错时,它会在脚本中为您提供正确的行号.
If you are getting an error in your compiled code you can add this to the top of your script before compiling it. When it errors out it will give you the right line number in your script.
#Au3Stripper_Parameters=/mo
这篇关于调试 AutoIt 脚本或获取当前执行的脚本行号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!