potential docs issues

Report problems with documented functionality
Asmodeus
Posts: 57
Joined: 19 Oct 2015, 15:53

potential docs issues

14 Aug 2017, 16:17

I don't know where to post this, there seems not to be a subforum regarding documentation issues/discussions (or I did not find it). please move this if necessary.

I noticed this code does not work (as intended), because the directive/ahk_class seems to be case-sensitive.

Code: Select all

#IfWinActive ahk_class notepad
    ^t::
        MsgBox you pressed ctrl+t inside notepad
    Return
#IfWinActive
Changing notepad to Notepad will fix the "issue". in the docs neither the #IfWinActive nor the section about ahk_class will mention this (case-sentiveness) (or at least i did not find a corresponding entry).
from what i know many/most commands are case-insensitive so i believe this should be mentioned.

also i noticed {return} is equivalent to {enter}.
^+1::
SendInput, hello {return} you
Return
i did not find anything about {return} in the documentation.
gregster
Posts: 9001
Joined: 30 Sep 2013, 06:48

Re: potential docs issues

14 Aug 2017, 16:31

https://autohotkey.com/docs/misc/WinTitle.htm (which explains ahk_class) says :
Window titles are case sensitive, except when using the i) modifier in a RegEx pattern
And https://autohotkey.com/docs/commands/Se ... chMode.htm says:
Regardless of the current TitleMatchMode, WinTitle, WinText, ExcludeTitle and ExcludeText are case sensitive. The only exception is the case-insensitive option of the RegEx mode; for example: i)untitled - notepad.
Even the entry about the directive itself remarks (https://autohotkey.com/docs/commands/_IfWinActive.htm):
Window titles and text are case sensitive.
Although right at the end under 'General remarks'... but there is also a relevant link to WinTitle, right at the start.
There might be more mentions.
gregster
Posts: 9001
Joined: 30 Sep 2013, 06:48

Re: potential docs issues

14 Aug 2017, 16:44

https://autohotkey.com/docs/KeyList.htm lists 'Return' as the same as 'Enter', but you are right that it is not mentioned in 'Send'. But if "Enter" works already...
Asmodeus
Posts: 57
Joined: 19 Oct 2015, 15:53

Re: potential docs issues

15 Aug 2017, 09:18

thanks gregster, you are right case sensitiveness is mentioned in many places. the reason I did not find it was because I searched for "case-sensitive".
this leads me to a proposal for searching, which I am not sure if it is easy to implement: approximate string matching search.

Also I am not sure whether the send command contains a complete list of all special keys, if so {return} is definitely missing, still if that is not the case, it won't hurt to add it there I believe.

I read somewhere someone derived a list (probably from the help file) which is used for the syntax highlighting. I noticed popular AHK editors have a different coloring output in regards of return/enter:
Image
so that could be another reason for having it included.
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: potential docs issues

15 Aug 2017, 11:58

Asmodeus wrote:I read somewhere someone derived a list (probably from the help file) which is used for the syntax highlighting.
list of every command/function/variable from across all versions - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 79#p130479

[Hotstrings] Expand parameters for AHK's functions, commands and directives. - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 60&t=27882
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
derz00
Posts: 497
Joined: 02 Feb 2016, 17:54
Location: Middle of the round cube
Contact:

Re: potential docs issues

15 Aug 2017, 15:23

Asmodeus wrote:thanks gregster, you are right case sensitiveness is mentioned in many places. the reason I did not find it was because I searched for "case-sensitive".
this leads me to a proposal for searching, which I am not sure if it is easy to implement: approximate string matching search.
Not sure what search engine you're using. ??

Google is a powerful search engine.

This works too. http://www.autohotkey.com/search
try it and see
...
Asmodeus
Posts: 57
Joined: 19 Oct 2015, 15:53

Re: potential docs issues

15 Aug 2017, 18:02

derz00 wrote:Google is a powerful search engine
"If you have nothing to hide, you have nothing to fear."

whenever I can, I stay away from ggl for privacy reasons. many ppl dont know/care or ignore the fact that ggl keeps record of every single search and does what not with the collected data from its services. in my opinion its mostly the information provided by its users that make ggl/abc next to apl the most expensive company on earth based on market cap.

you are right, its search engine is powerful, but for those who care about their privacy: there are different ggl powered search engines around, providing the same results, while respecting ones privacy, apparently by using proxies.

sorry for the deviation. to answer quickly your question, i use a chm reader in offline mode with the compiled help file (chm format). the search result there for "case-sensitive" is 0 while "case sensitive" is found 75 times.

@jeeswg:
as it's difficult for me to check right now on my handheld device, on the provided links does there appear {return} somewhere?
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: potential docs issues

15 Aug 2017, 18:08

'Return' is in my list of commands, but the list will only tell you that 'Return' is control flow statement, present in all versions of AutoHotkey.

However '{Return}' when used with Send/SendInput, is not listed there. I.e. '{Return}' which is an alternative for '{Enter}'. For that, see this link (mentioned earlier by gregster):
List of Keys and Mouse/Joystick Buttons for Hotkeys and Macros
https://autohotkey.com/docs/KeyList.htm#Keyboard
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 64 guests