Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Suggestions on documentation improvements


  • Please log in to reply
244 replies to this topic
nnnik
  • Members
  • 1625 posts
  • Last active: Apr 11 2017 02:13 PM
  • Joined: 28 Jul 2012

I think that the documentation implies that A_LastError is set by the Dll function GetLastError.

http://msdn.microsof...0(v=vs.85).aspx


Visit the new forum ahkscript.org.

http://ahkscript.org


Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006

This is not correct.  If the target directory does not exist, the file is not created.  The system issues A_lasterror  3

 

If every part of the documentation had clauses like "if it doesn't fail for x reason", the documentation would be very verbose.  If there is a problem carrying out the command, ErrorLevel and A_LastError are set.  This much is documented, and as you've found, the error code indicates the reason.  (3 = ERROR_PATH_NOT_FOUND = The system cannot find the path specified.)

 

FileAppend just tries to create the file.  If that fails, it sets ErrorLevel.

 

Btw, your post has nothing to do with the topic in which you posted it (Gathering all forum issues...).  I have moved your post.



Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006

I think that the documentation implies that A_LastError is set by the Dll function GetLastError.

http://msdn.microsof...0(v=vs.85).aspx

 

I think you're missing the point.  (Side note: A_LastError is an AutoHotkey variable, and as such, could not possibly be set by GetLastError. However, as the documentation states, the value A_LastError contains comes from GetLastError(). What it doesn't say explicitly is that the value of A_LastError is not dynamic; it is updated only by running certain other commands.)

 

Joefiesta, I agree the documentation for A_LastError may be misleading and should be improved.



Joefiesta
  • Members
  • 84 posts
  • Last active: Sep 09 2016 02:27 PM
  • Joined: 01 Nov 2010

Documentation for SETTIMER:

 

1.  The documentation should note that the numerical value of a PERIOD parameter must be an integer.

 

 

thank you.

 

 



space
  • Members
  • 520 posts
  • Last active:
  • Joined: 12 Aug 2014
It is doubtful the documentation here ahk . com will be updated, if you have any suggestions or questions it is best to post them at http://ahkscript.org...php?f=13&t=1434 where the developer(s) are more likely to see it.