Documentation updated

Discuss the future of the AutoHotkey language
lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Documentation updated

23 Jun 2016, 03:11

Online Documentation
Download as HTML (zip)
Browse the source code

The current state of the documentation:

Most of what was documented in v2-changes has been integrated, and I've made several corrections along the way. However:
  • A great many examples have not been updated.
  • The Script Showcase is outdated even for v1, and will probably be removed for v2 if there are no volunteers to update it.
  • I have not documented #MustDeclare or the Var keyword as they will probably be removed.
  • I have not updated the information about error handling (ErrorLevel) for each function yet (but since there wasn't much detail in the first place, that might not be an issue).
  • There are many inconsistencies that I have not addressed, mostly relating to syntax. Related: Commands vs Functions.
Note: As the Table of Contents and Index rely on a file (content.js) which is automatically generated by a script (combining several js files), they do not work on GitHub. To get them working, you can download the documentation and run docs\static\source\CreateFiles4Help.ahk -- or if you have HTML Help Workshop, compile_chm.ahk.
Coco
Posts: 771
Joined: 29 Sep 2013, 20:37
Contact:

Re: Documentation updated

23 Jun 2016, 07:50

Thank you! Appreciate your efforts :)
DeepMind
Posts: 271
Joined: 19 Jul 2016, 14:47

Re: Documentation updated

16 Sep 2016, 10:07

Thanks lexikos :)
steveadams
Posts: 4
Joined: 26 Oct 2016, 19:33

Re: Documentation updated

15 Nov 2016, 18:50

I'm not sure if this is the right place to suggest documentation corrections, but ...
The following sentence in the "Clipboard" documentation appears to be out-of-date:
"A saved clipboard file internally consists of a four-byte format type, followed by a four-byte data-block size, followed by the data-block for that format."
I think that the data block size can also be 8-bytes.
steveadams
Posts: 4
Joined: 26 Oct 2016, 19:33

Re: Documentation updated

15 Nov 2016, 19:07

Another minor issue with the documentation ...
In the "Functions" page, under "Local Variables" it says
"All variables accessed or created inside a function are local by default (except super-global variables and built-in variables such as Clipboard, ErrorLevel, and A_TimeIdle)"
Another noteworthy exception is that dynamically referenced variables resolve to a global at runtime if it exists.
For example, the following code assigns a value to the global variable inside the function, rather than creating a local variable.

Code: Select all

X = 1
Func() {
  V = X
  %V% = 2
}
Func()
MsgBox, %X%
guest3456
Posts: 3462
Joined: 09 Oct 2013, 10:31

Re: Documentation updated

15 Nov 2016, 23:08

steveadams wrote:Another minor issue with the documentation ...
In the "Functions" page, under "Local Variables" it says
"All variables accessed or created inside a function are local by default (except super-global variables and built-in variables such as Clipboard, ErrorLevel, and A_TimeIdle)"
Another noteworthy exception is that dynamically referenced variables resolve to a global at runtime if it exists.
For example, the following code assigns a value to the global variable inside the function, rather than creating a local variable.

Code: Select all

X = 1
Func() {
  V = X
  %V% = 2
}
Func()
MsgBox, %X%
see further down in the docs on the same Functions page:
Within a function, any dynamic variable reference such as Array%i% always resolves to a local variable unless no variable of that name exists, in which case a global is used if it exists.

lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: Documentation updated

16 Nov 2016, 01:59

steveadams wrote:I'm not sure if this is the right place to suggest documentation corrections, but ...
Of course it isn't. This is a topic about one instance of the v2 documentation having been updated, in a forum titled "AutoHotkey v2 Development".
Another noteworthy exception is that dynamically referenced variables resolve to a global at runtime if it exists.
Ironically, that is not the case in v2. The documentation referenced in this topic (the v2 documentation, which I'm sure you are not using) has the same passage, and for v2 it is correct.
guest3456
Posts: 3462
Joined: 09 Oct 2013, 10:31

Re: Documentation updated

03 Dec 2016, 10:06

didn't know where else to put this, and since v2-changes doc isn't in the doc repo, i'll just report it here:

the "Built-in Variables" section lists 5 removed variables.. one that is missing from that list is A_AutoTrim

guest3456
Posts: 3462
Joined: 09 Oct 2013, 10:31

Re: Documentation updated

12 Dec 2016, 10:58

similarly, If[Not]InString commands are not listed as removed anywhere in the v2-changes

lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: Documentation updated

12 Dec 2016, 19:36

IfXXX is listed under "Removed commands". The XXX means any non-empty string.
guest3456
Posts: 3462
Joined: 09 Oct 2013, 10:31

Re: Documentation updated

17 Dec 2016, 23:27

ah i see

another from v2changes
Renamed commands:
FileSelectDir -> DirSelect
should be
Renamed commands:
FileSelectFolder -> DirSelect


Return to “AutoHotkey Development”

Who is online

Users browsing this forum: No registered users and 21 guests