Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1: Changes #570

Merged
merged 29 commits into from
Oct 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d72ebaa
Remove <kbd> for readability
Ragnar-F Aug 23, 2022
4a582bf
Add <em> (for old browsers w/o syntax highlighter)
Ragnar-F Aug 23, 2022
cb26683
Use default slash for paths
Ragnar-F Aug 23, 2022
4775eee
Fix non-unique id
Ragnar-F Aug 23, 2022
7570ff7
Add missing </a>
Ragnar-F Aug 23, 2022
3deaca3
Fix 404 links
Ragnar-F Aug 23, 2022
ea11f01
Add note that FileCreateDir only support backslash
Ragnar-F Aug 27, 2022
4f45cf5
Add note when to use backslash or forward slash for SplitPath
Ragnar-F Sep 2, 2022
b35a699
Add note that DllCall only support backslash
Ragnar-F Sep 2, 2022
ab008d2
Add missing methods/props to data_index
Ragnar-F Sep 9, 2022
540a3ce
Add built-in methods/props filter
Ragnar-F Sep 9, 2022
171252e
NewEnum -> _NewEnum
Ragnar-F Sep 9, 2022
0f08db0
Add sub-commands to data_index
Ragnar-F Sep 9, 2022
da30e1e
Add sub-commands filter
Ragnar-F Sep 9, 2022
3c8b6c7
Remove duplicate entries in data_index
Ragnar-F Sep 9, 2022
ebc25f0
Add no-highlight
Ragnar-F Sep 9, 2022
505764c
Change formatting for better translatability
Ragnar-F Sep 10, 2022
1eb8c5f
Add heading id
Ragnar-F Sep 10, 2022
4ace628
Change formatting
Ragnar-F Sep 10, 2022
701447e
Add <code>
Ragnar-F Sep 19, 2022
e24770c
Use sessionStorage otherwise window.name + related fixes
Ragnar-F Sep 19, 2022
d4887f8
Change dark theme (less yellowish, less contrast)
Ragnar-F Sep 20, 2022
9f4417a
Align BIV notes with others
Ragnar-F Sep 26, 2022
fcb41d6
Update SetRegView.htm
Ragnar-F Sep 26, 2022
4af7e58
Update SetDefaultMouseSpeed.htm
Ragnar-F Sep 26, 2022
48a3ac9
Update Drive*.htm (adjusted to v2 equivalents)
Ragnar-F Sep 28, 2022
cd3272f
<em>Number</em> -> the specified number
Ragnar-F Sep 28, 2022
acb968b
Fix links
Ragnar-F Oct 2, 2022
25189a5
Add multi-statement expression note
Ragnar-F Oct 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/AHKL_Features.htm
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ <h2 id="enc">Text Encodings</h2>
<span class="func">FileRead</span>, OutputVar, *P<i>nnn</i> Filename
<span class="func">FileAppend</span> <span class="optional">, Text, Filename, Encoding</span>
</pre>
<p>While <i>nnn</i> must be a numeric <a href="http://msdn.microsoft.com/en-us/library/dd317756.aspx">code page identifier</a>, <i>Encoding</i> follows the same format as <a href="commands/FileEncoding.htm">FileEncoding</a>.</p>
<p>While <i>nnn</i> must be a numeric <a href="https://learn.microsoft.com/windows/desktop/Intl/code-page-identifiers">code page identifier</a>, <i>Encoding</i> follows the same format as <a href="commands/FileEncoding.htm">FileEncoding</a>.</p>
<p><b>See also:</b> <a href="Compat.htm#FileRead">Script Compatibility</a></p>

<h2 id="Variadic">Variadic Functions and Function-Calls</h2>
Expand Down
4 changes: 2 additions & 2 deletions docs/ChangeLogHelp.htm
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ <h2 id="v1.0.46.09">1.0.46.09 - March 4, 2007</h2>
<p>Fixed inability to pass certain <a href="Variables.htm#ternary">ternary expressions</a> to <a href="Functions.htm#ByRef">ByRef parameters</a>. [thanks Titan]</p>
<p>Fixed <code><a href="commands/GuiControlGet.htm">GuiControlGet</a>, OutputVar, Pos</code> so that it doesn't make the OutputVar blank. [thanks PhiLho]</p>
<p>Changed and fixed continuation sections so that the <a href="Scripts.htm#CommentOption">"Comment" option</a> doesn't force the <a href="Scripts.htm#LTrim">LTrim option</a> into effect. [thanks Titan]</p>
<p>Changed the <a href="http://msdn2.microsoft.com/en-us/library/01cfys9z.aspx">Terminal Server Awareness flag</a> back to "disabled" on AutoHotkey.exe and compiled scripts. This improves flexibility and backward compatibility (see <a href="https://www.autohotkey.com/forum/topic16041.html">discussion</a> at forum).</p>
<p>Changed the <a href="https://docs.microsoft.com/cpp/build/reference/tsaware-create-terminal-server-aware-application">Terminal Server Awareness flag</a> back to "disabled" on AutoHotkey.exe and compiled scripts. This improves flexibility and backward compatibility (see <a href="https://www.autohotkey.com/forum/topic16041.html">discussion</a> at forum).</p>
<h2 id="v1.0.46.08">1.0.46.08 - February 7, 2007</h2>
<p>Fixed unreliability of <a href="Variables.htm#ComSpec">ComSpec</a> and <a href="Concepts.htm#environment-variables">environment variables</a> on Windows 9x (broken by v1.0.46.07). [thanks Loriss]</p>
<p>Changed: When AutoHotkey.exe is launched without a script specified, it will now run (or prompt you to create) the file AutoHotkey.ahk in the <a href="Variables.htm#MyDocuments">My Documents</a> folder. The only exception is when AutoHotkey.ini exists in the working directory, in which case it uses the old behavior of executing that file.</p>
Expand All @@ -159,7 +159,7 @@ <h2 id="v1.0.46.06">1.0.46.06 - January 16, 2007</h2>
<p>Applied minor fixes and improvements to <a href="misc/RegEx-QuickRef.htm">regular expressions</a> by upgrading from PCRE 6.7 to 7.0. One of the most notable improvements is the `a option, which recognizes any type of newline (namely `r, `n, or `r`n). Similarly, the \R escape sequence means "any single newline of any type". See also: <a href="http://www.pcre.org/changelog.txt">Full PCRE changelog</a></p>
<p>Changed and fixed all <a href="commands/Control.htm">Control commands</a> and <a href="commands/StatusBarWait.htm">StatusBarWait</a> to obey <a href="commands/SetTitleMatchMode.htm#RegEx">SetTitleMatchMode RegEx</a> as documented.</p>
<p>Changed <a href="commands/RegExReplace.htm">RegExReplace()</a> to return the original/unaltered string rather than "" when an error occurs.</p>
<p>Changed: Enabled the <a href="http://msdn2.microsoft.com/en-us/library/01cfys9z.aspx">Terminal Server Awareness flag</a> on AutoHotkey.exe and <a href="Scripts.htm#ahk2exe">compiled scripts</a>.</p>
<p>Changed: Enabled the <a href="https://docs.microsoft.com/cpp/build/reference/tsaware-create-terminal-server-aware-application">Terminal Server Awareness flag</a> on AutoHotkey.exe and <a href="Scripts.htm#ahk2exe">compiled scripts</a>.</p>
<p>Improved performance when <a href="Variables.htm#AssignOp">assigning</a> large strings returned from <a href="Functions.htm">user-defined functions</a>. [thanks Laszlo]</p>
<h2 id="v1.0.46.05">1.0.46.05 - January 4, 2007</h2>
<p>Fixed the <a href="commands/Input.htm">Input command</a> to allow named end keys like {F9} to work even when the shift key is being held down (broken by v1.0.45). [thanks Halweg]</p>
Expand Down
18 changes: 9 additions & 9 deletions docs/Functions.htm
Original file line number Diff line number Diff line change
Expand Up @@ -540,47 +540,47 @@ <h3 id="Math">Math</h3>
</tr>
<tr id="Abs">
<td><a href="commands/Math.htm#Abs">Abs</a></td>
<td>Returns the absolute value of <em>Number</em>.</td>
<td>Returns the absolute value of the specified number.</td>
</tr>
<tr id="Ceil">
<td><a href="commands/Math.htm#Ceil">Ceil</a></td>
<td>Returns <em>Number</em> rounded up to the nearest integer (without any .00 suffix).</td>
<td>Returns the specified number rounded up to the nearest integer (without any .00 suffix).</td>
</tr>
<tr id="Exp">
<td><a href="commands/Math.htm#Exp">Exp</a></td>
<td>Returns <em>e</em> (which is approximately 2.71828182845905) raised to the <em>N</em>th power.</td>
</tr>
<tr id="Floor">
<td><a href="commands/Math.htm#Floor">Floor</a></td>
<td>Returns <em>Number</em> rounded down to the nearest integer (without any .00 suffix).</td>
<td>Returns the specified number rounded down to the nearest integer (without any .00 suffix).</td>
</tr>
<tr id="Log">
<td><a href="commands/Math.htm#Log">Log</a></td>
<td>Returns the logarithm (base 10) of <em>Number</em>.</td>
<td>Returns the logarithm (base 10) of the specified number.</td>
</tr>
<tr id="Ln">
<td><a href="commands/Math.htm#Ln">Ln</a></td>
<td>Returns the natural logarithm (base e) of <em>Number</em>.</td>
<td>Returns the natural logarithm (base e) of the specified number.</td>
</tr>
<tr>
<td><span id="Max"></span><span id="Min"></span><a href="commands/Math.htm#Max">Max</a> / <a href="commands/Math.htm#Min">Min</a></td>
<td>Returns the highest/lowest value of one or more numbers.</td>
</tr>
<tr id="Mod">
<td><a href="commands/Math.htm#Mod">Mod</a></td>
<td>Returns the remainder when <em>Dividend</em> is divided by <em>Divisor</em>.</td>
<td>Returns the remainder of the specified dividend divided by the specified divisor.</td>
</tr>
<tr id="Round">
<td><a href="commands/Math.htm#Round">Round</a></td>
<td>Returns <em>Number</em> rounded to <em>N</em> decimal places.</td>
<td>Returns the specified number rounded to <em>N</em> decimal places.</td>
</tr>
<tr id="Sqrt">
<td><a href="commands/Math.htm#Sqrt">Sqrt</a></td>
<td>Returns the square root of <em>Number</em>.</td>
<td>Returns the square root of the specified number.</td>
</tr>
<tr>
<td><span id="Sin"></span><span id="Cos"></span><span id="Tan"></span><a href="commands/Math.htm#Sin">Sin</a> / <a href="commands/Math.htm#Cos">Cos</a> / <a href="commands/Math.htm#Tan">Tan</a></td>
<td>Returns the trigonometric sine/cosine/tangent of <em>Number</em>.</td>
<td>Returns the trigonometric sine/cosine/tangent of the specified number.</td>
</tr>
<tr>
<td><span id="ASin"></span><span id="ACos"></span><span id="ATan"></span><a href="commands/Math.htm#ASin">ASin</a> / <a href="commands/Math.htm#ACos">ACos</a> / <a href="commands/Math.htm#ATan">ATan</a></td>
Expand Down
2 changes: 1 addition & 1 deletion docs/Hotkeys.htm
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ <h2 id="Context">Context-sensitive Hotkeys</h2>
</pre>

<h2 id="combo">Custom Combinations</h2>
<p>Normally shortcut key combinations consist of optional prefix/modifier keys (<kbd>Ctrl</kbd>, <kbd>Alt</kbd>, <kbd>Shift</kbd> and <kbd>LWin</kbd>/<kbd>RWin</kbd>) and a single suffix key. The standard modifier keys are designed to be used in this manner, so normally have no immediate effect when pressed down.</p>
<p>Normally shortcut key combinations consist of optional prefix/modifier keys (Ctrl, Alt, Shift and LWin/RWin) and a single suffix key. The standard modifier keys are designed to be used in this manner, so normally have no immediate effect when pressed down.</p>
<p>A custom combination of two keys (including mouse but not joystick buttons) can be defined by using " &amp; " between them. Because they are intended for use with prefix keys that are not normally used as such, custom combinations have the following special behavior:</p>
<ul>
<li>The prefix key loses its native function, unless it is a standard modifier key or toggleable key such as <kbd>CapsLock</kbd>.</li>
Expand Down
6 changes: 3 additions & 3 deletions docs/Objects.htm
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ <h3 id="Function_References">Function References <span class="ver">[v1.1.00+]</s
<p>For backward-compatibility, the second form will not pass <i>array</i> as a parameter if <code>array[A_Index]</code> contains a function name instead of a function reference. However, if <code>array[A_Index]</code> is <a href="#Custom_Objects">inherited</a> from <code>array.base[A_Index]</code>, <i>array</i> will be passed as a parameter.</p>

<h2 id="Custom_Objects">Custom Objects</h2>
<p>Objects created by the script do not need to have any predefined structure. Instead, each object can inherit properties and methods from its <code>base</code> object (otherwise known as a "prototype" or "class"). Properties and methods can also be added to (or removed from) an object at any time, and those changes will affect any and all derived objects. For more complex or specialized situations, a base object can override the standard behaviour of any objects derived from it by defining <a href="#Meta_Functions"><i>meta-functions</i></a>.</p>
<p>Objects created by the script do not need to have any predefined structure. Instead, each object can inherit properties and methods from its <em>base</em> object (otherwise known as a "prototype" or "class"). Properties and methods can also be added to (or removed from) an object at any time, and those changes will affect any and all derived objects. For more complex or specialized situations, a base object can override the standard behaviour of any objects derived from it by defining <a href="#Meta_Functions"><i>meta-functions</i></a>.</p>
<p><em>Base</em> objects are just ordinary objects, and are typically created one of two ways:</p>
<pre>class baseObject {
static foo := "bar"
Expand All @@ -227,10 +227,10 @@ <h2 id="Custom_Objects">Custom Objects</h2>
obj2 := {base: baseObject}
obj3 := new baseObject
MsgBox % obj1.foo " " obj2.foo " " obj3.foo</pre>
<p>It is possible to reassign an object's <code>base</code> at any time, effectively replacing all of the properties and methods that the object inherits.</p>
<p>It is possible to reassign an object's <em>base</em> at any time, effectively replacing all of the properties and methods that the object inherits.</p>

<h3 id="Custom_Prototypes">Prototypes</h3>
<p>Prototype or <code>base</code> objects are constructed and manipulated the same as any other object. For example, an ordinary object with one property and one method might be constructed like this:</p>
<p>Prototype or <em>base</em> objects are constructed and manipulated the same as any other object. For example, an ordinary object with one property and one method might be constructed like this:</p>
<pre><em>; Create an object.</em>
thing := {}
<em>; Store a value.</em>
Expand Down
2 changes: 1 addition & 1 deletion docs/Program.htm
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ <h3 id="title">Main Window Title</h3>
</pre>

<h2 id="embedded-scripts">Embedded Scripts <span class="ver">[v1.1.34+]</span></h2>
<p>Scripts may be embedded into a standard AutoHotkey .exe file by adding them as Win32 (RCDATA) resources using the <a href="Scripts.htm#ahk2exe">Ahk2Exe compiler</a>. To add additional scripts, see the <a href="misc\Ahk2ExeDirectives.htm#AddResource">AddResource</a> compiler directive.</p>
<p>Scripts may be embedded into a standard AutoHotkey .exe file by adding them as Win32 (RCDATA) resources using the <a href="Scripts.htm#ahk2exe">Ahk2Exe compiler</a>. To add additional scripts, see the <a href="misc/Ahk2ExeDirectives.htm#AddResource">AddResource</a> compiler directive.</p>
<p>An embedded script can be specified on the command line or with <a href="commands/_Include.htm">#Include</a> by writing an asterisk (*) followed by the resource name. For an integer ID, the resource name must be a hash sign (#) followed by a decimal number.</p>
<p>The program may automatically load script code from the following resources, if present in the file:</p>
<table class="info">
Expand Down
6 changes: 3 additions & 3 deletions docs/Scripts.htm
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ <h2 id="continuation">Splitting a Long Line into a Series of Shorter Ones</h2>
<h2 id="ahk2exe">Convert a Script to an EXE (Ahk2Exe)</h2>
<p>A script compiler (courtesy of fincs, with additions by TAC109) is included with the program.</p>
<p>Once a script is compiled, it becomes a standalone executable; that is, AutoHotkey.exe is not required in order to run the script. The compilation process creates an executable file which contains the following: the AutoHotkey interpreter, the script, any files it <a href="commands/_Include.htm">includes</a>, and any files it has incorporated via the <a href="commands/FileInstall.htm">FileInstall</a> command. <span class="ver">[v1.1.33+]:</span> Additional files can be included using <a href="misc/Ahk2ExeDirectives.htm">compiler directives</a>.</p>
<h3 id="toc">Compiler Topics</h3>
<h3 id="ahk2exe-toc">Compiler Topics</h3>
<ul>
<li><a href="#ahk2exe-run">Running the Compiler</a></li>
<li><a href="#ahk2exe-base">Base Executable File</a></li>
<li><a href="#CompilerDirectives">Script Compiler Directives</a></li>
<li><a href="#mpress">Compressing Compiled Scripts</li>
<li><a href="#mpress">Compressing Compiled Scripts</a></li>
<li><a href="#information">Background Information</a></li>
</ul>
<h3 id="ahk2exe-run">Running the Compiler</h3>
Expand Down Expand Up @@ -208,7 +208,7 @@ <h3 id="ahk2exe-run">Running the Compiler</h3>

<h3 id="ahk2exe-base">Base Executable File</h3>
<p>Each compiled script .exe is based on an executable file which implements the interpreter. The base files included in the Compiler directory have the ".bin" extension; these are versions of the interpreter which do not include the capability to load external script files. Instead, the program looks for a Win32 (RCDATA) resource named "&gt;AUTOHOTKEY SCRIPT&lt;" and loads that, or fails if it is not found.</p>
<p><span class="ver">[v1.1.34+]:</span> The standard AutoHotkey executable files can also be used as the base of a compiled script, by embedding a Win32 (RCDATA) resource with ID 1. (Additional scripts can be added with the <a href="misc\Ahk2ExeDirectives.htm#AddResource">AddResource</a> compiler directive.) This allows the compiled script .exe to be used with the <a href="#SlashScript">/script</a> switch to execute scripts other than the main embedded script. For more details, see <a href="Program.htm#embedded-scripts">Embedded Scripts</a>.</p>
<p><span class="ver">[v1.1.34+]:</span> The standard AutoHotkey executable files can also be used as the base of a compiled script, by embedding a Win32 (RCDATA) resource with ID 1. (Additional scripts can be added with the <a href="misc/Ahk2ExeDirectives.htm#AddResource">AddResource</a> compiler directive.) This allows the compiled script .exe to be used with the <a href="#SlashScript">/script</a> switch to execute scripts other than the main embedded script. For more details, see <a href="Program.htm#embedded-scripts">Embedded Scripts</a>.</p>

<h3 id="CompilerDirectives">Script Compiler Directives</h3>
<p><span class="ver">[v1.1.33+]:</span> Script compiler directives allow the user to specify details of how a script is to be compiled. Some of the features are:</p>
Expand Down
5 changes: 4 additions & 1 deletion docs/Variables.htm
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,10 @@ <h3 id="operators">Expression Operators (in descending precedence order)</h3>
</tr>
<tr>
<td class="center"><strong>(</strong><em>expression</em><strong>)</strong></td>
<td><p>Any sub-expression enclosed in parentheses. For example, <code>(3 + 2) * 2</code> forces <code>3 + 2</code> to be evaluated first.</p></td>
<td>
<p>Any sub-expression enclosed in parentheses. For example, <code>(3 + 2) * 2</code> forces <code>3 + 2</code> to be evaluated first.</p>
<p>For a multi-statement expression, the result of the <u>first</u> statement is returned. For example, <code>(a := 1, b := 2, c := 3)</code> returns 1.</p>
</td>
</tr>
<tr>
<td class="center"><p><strong>mod()<br>
Expand Down
2 changes: 1 addition & 1 deletion docs/commands/DllCall.htm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h2 id="Parameters">Parameters</h2>
<dl>

<dt>[DllFile\]Function</dt>
<dd><p>The DLL or EXE file name followed by a backslash and the name of the function. For example: <code>"MyDLL\MyFunction"</code> (the file extension ".dll" is the default when omitted). If an absolute path isn't specified, <em>DllFile</em> is assumed to be in the system's PATH or <a href="../Variables.htm#WorkingDir">A_WorkingDir</a>.</p>
<dd><p>The DLL or EXE file name followed by a backslash and the name of the function. For example: <code>"MyDLL\MyFunction"</code> (the file extension ".dll" is the default when omitted). If an absolute path isn't specified, <em>DllFile</em> is assumed to be in the system's PATH or <a href="../Variables.htm#WorkingDir">A_WorkingDir</a>. Note that DllCall() expects a path with backslashes (\). Forward slashes (/) are not supported.</p>
<p id="std"><em>DllFile</em> may be omitted when calling a function that resides in User32.dll, Kernel32.dll, ComCtl32.dll, or Gdi32.dll. For example, <code>"User32\IsWindowVisible"</code> produces the same result as <code>"IsWindowVisible"</code>.</p>
<p>If no function can be found by the given name, an A (ANSI) or W (Unicode) suffix is automatically appended based on which version of AutoHotkey is running the script. For example, <code>"MessageBox"</code> is the same as <code>"MessageBoxA"</code> in ANSI versions and <code>"MessageBoxW"</code> in Unicode versions.</p>
<p>Performance can be dramatically improved when making <em>repeated</em> calls to a DLL by <a href="#load">loading it beforehand</a>.</p>
Expand Down