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: 2187
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: 4685
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.
Remaining with AHK 1.1.25.02 until v2 will become beta.
guest3456
Posts: 2022
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: 5410
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

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: 5813
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
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....
Noesis
Posts: 178
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 v2 Development”

Who is online

Users browsing this forum: No registered users and 3 guests