In the above, the loop is performed the specified number of times unless RunCount contains 0, in which case the loop is skipped entirely.
A loop may also terminate itself when one or more conditions change. The following example clicks the left mouse button repeatedly while the user is holding down the F1 key:
In the example above, when the user releases the F1 key, the loop detects this and stops itself via the break command. Break causes execution to jump to the line after the loop's closing brace.
An alternate way to achieve the same effect is with a 'while' loop:
AutoHotkey automates keystrokes and mouse clicks to more efficiently handle repetitive tasks, like clicking through screens or entering your street address. You can also write macros or use the. This is a full package of AHK, with all included programs like the compiler, window spy, and AutoScriptWriter. There are three launchers included in the package. Things to do: Read my. Download Pulover’s Macro Creator Download Current Version: 5.3.7 Download Installer from GitHub – Easy installation with shortcuts and file association.; Download Portable zip – Portable ready-to-use. )中自带有录制鼠标和键盘宏的工具——AutoScriptWriter: 从图中可以看出界面非常简单,只有这么几个按钮,功能也十分有限。目前 AutoHotkeyL 已经去除了,可能因缺乏更新而与目前的 AutoHotkeyL.
The examples shown above are general-purpose loops. For more specialized needs, consider one of the following loops:
File-reading/writing loop: Retrieves the lines in a text file, one at a time. This can be used to transform a file into a different format on a line-by-line basis. It can also be used to search for lines matching your criteria.
Autoscriptwriter Recorder
Files and folders loop: Retrieves the specified files or folders, one at a time. This allows an operation to be performed upon each file or folder that meets your criteria.
Parsing loop: Retrieves substrings from a string, one at a time. This allows a string such as 'Red,Green,Blue' to be easily broken down into its three component fields.
Autoscriptwriter Record
Registry loop: Retrieves the contents of the specified registry subkey, one item at a time.