cryptic style

Discuss the future of the AutoHotkey language
User99
Posts: 1
Joined: 07 Jan 2017, 13:12

cryptic style

07 Jan 2017, 14:17

Hi

I've read this in your helpfile:
"You might be wondering "How the crud am I supposed to know that ^ means CTRL?!". Well, good question."

Well, no, this was actually not what I thought. More somehing like:
"Why the heck do you use cryptic symbols to express the words that symbolize it?"
"Why not using CTRL for CTRL?"
Is it so importend that nobody can read the code? Is it so importand to waist brain capacity by learning a cryptic style to make code smaller, insteed of using it for what the user expect to do?

so long
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: cryptic style

08 Jan 2017, 10:14

Because it is more complex than the user expects it to be.
I could go into detail here but feel that said time would be a wasted effort.
Recommends AHK Studio
just me
Posts: 9442
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: cryptic style

08 Jan 2017, 10:32

Reading a few lines more, you'll find
(For the full list of symbols, see the Hotkey page)
In short:
^ is a modifier symbol used as a prefix for another key.
Ctrl is the name of the Ctrl key itself.
guest3456
Posts: 3462
Joined: 09 Oct 2013, 10:31

Re: cryptic style

08 Jan 2017, 11:33

User99 wrote: I've read this in your helpfile:
"You might be wondering "How the crud am I supposed to know that ^ means CTRL?!". Well, good question."
that's from the user-created tutorial

User99 wrote: Well, no, this was actually not what I thought. More somehing like:
"Why the heck do you use cryptic symbols to express the words that symbolize it?"
"Why not using CTRL for CTRL?"
Is it so importend that nobody can read the code? Is it so importand to waist brain capacity by learning a cryptic style to make code smaller, insteed of using it for what the user expect to do?

so long
in many command prompts, ascii control characters are indicated with the caret ^ symbol, so this notation is standard for that key:
https://en.wikipedia.org/wiki/Caret_notation
https://en.wikipedia.org/wiki/Control_character

Win+R then cmd then at the prompt, hold down CTRL+some letters and youll see

i think you'd have to ask Chris, the original developer, why he chose the symbols that he did for Shift,Alt,Win

it may be worthwhile to discuss a different modifier syntax but i dont see it as a big issue compared to the other issues that v2 tackles

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

Re: cryptic style

09 Jan 2017, 02:06

I'm guessing that the syntax was simply copied from AutoIt v2, and maybe WinBatch (or something else) before that. AutoIt v3 appears to use the same symbols.

SendKeys uses + for Shift, which may have influenced it, but it uses % for Alt.
User avatar
joedf
Posts: 8951
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: cryptic style

11 Jan 2017, 22:06

I'm thinking it's AutoIt also... and they probably chose it because of what guest3456 mentioned....
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Noesis
Posts: 301
Joined: 26 Apr 2014, 07:57

Re: cryptic style

12 Jan 2017, 00:36

Perhaps my memory is flawed, but to me some of it's been a "standard" for a while. ^ has always been ctrl going back to dos days it's what would appear with ctrl key combos that didn't do anything, and + as shift is just kind of logical and used by more than autoit, or ahk (I don't think I've seen a program that fakes key presses and doesn't use it as a shift modifier, except the total gui ones which require use say a checkbox). Win and alt modifiers tend to be the ones that vary between programs.

Return to “AutoHotkey Development”

Who is online

Users browsing this forum: No registered users and 22 guests