关于SciTE4AutoHotkey以及AutoHotkey的关键解释与翻译,愿愿原创

愿愿:在制作游戏外挂中,我们会使用按键精灵,autohotkey等等吧,我不想教坏读者,人人去制作外挂。我相信真正心中有信仰的人,是不屑于搞这些的。但我们往往会从一些坏的东西开始,了解好的东西。废话不多说了,我们切入正题。

什么是SciTE4AutoHotkey?它是专门为AutoHotkey而制作的可视化编程环境。源本是由Neil Hodgson所开始开发的。操作极其简单,功能上满足我们日常编写AutoHotkey的需要。有时候,洋人的东西就是好。当然,我们自己的东西也有优点,不必妄自菲薄。

我只讲关键点,一些诸如:脚本打开,运行,调试的按钮,就麻烦大家自己动动手。

下载SciTE4AutoHotkey,可以在AutoHotkey帮助文档界面,选择search选项卡,搜索SciTE4AutoHotkey,回车,Debugger Clients项目下,在Debugger Clients文章中,有链接,点击下载。如果打不开,请翻墙。

General Conventions

Names: Variable and function names are not case sensitive (for example, CurrentDate is the same as currentdate). For details such as maximum length and usable characters, see Names.

一般约定

命名:AutoHotkey变量与函数的命名不区分大小写。

Spaces are mostly ignored: Indentation (leading space) is important for writing readable code, but is not required by the program and is generally ignored. Spaces and tabs are generally ignored at the end of a line, within an expression (except between quotes), and before and after command parameters. However, spaces are significant in some cases, including:

  • Function and method calls require there to be no space between the function/method name and (.
  • Spaces are required when performing concatenation.
  • Spaces may be required between two operators, to remove ambiguity.
  • Single-line comments require a leading space if they are not at the start of the line.

空格:行首缩进对于脚本的可读性非常重要,但并不是脚本代码所必需的。空格与tab往往不需要注意什么,但是,有几种情况

需要读者非常注意:

1,如果注释不是位于一行的开始顶头,那么必需加上空格。

比如:"if(Var=1) ;变量值测试“,而不能写成"if(Var=1);变量值测试";乍一看,没什么区别,但注意,一个有空格,一个没空格。

愿愿废话:科班出身的代码员,都知道,编写代码一定要注意大小写和空白,粗心大意使不得。

2,在函数和方法调用时,函数或者方法的名称与左括号之间,不能有空格。

3,两个操作符之间,有时需要空格,为了消除歧义。

4,字符连接操作时,空格是必须的。

Line breaks are meaningful: Line breaks generally act as a statement seperator, terminating the previous command or expression. (A statement is simply the smallest standalone element of the language that expresses some action to be carried out.) The exception to this is line continuation (see below).

换行符是很重要的:一般情况下,命令与命令之间是靠换行符来分隔的,换行符来区分前一个命令与后一个命令。

愿愿:每个编程语言都有各自的语法,这是语言本身的特性和用途决定的,我们只需要知道,编程之前先看语法。

说了半天无用的,下面讲讲有用的。

这篇文章,是对于学过c语言的人,是必要的,因为AutoHotKey与c语言有诸多不同,但又大体相同。对于没有学过c语言的人,当我啥也没说。

Breakpoints

Breakpoints are pausing points in a program. If AutoHotkey is about to execute a line that has a breakpoint, execution is paused. In order to set a breakpoint on a line, click on the margin to the right of the line numbers:

AutoHotKey会停在断点处,设置断点的方法是,在SciTE4AutoHotkey中点击行数右边的空白,但在编辑器该行的左边。

点击小虫子,开始调试。

会英文的人,可以直接阅读AutoHotkey的Concepts and Conventions帮助文章。不英文的人,哦,你不会英文呀?!!

注意:SciTE4AutoHotkey还可以编写lua脚本。

满怀信心开始你的,AutoHotkey之旅吧!

猜你喜欢

转载自blog.csdn.net/tom_xuzg/article/details/82850437