Who is "MY"?

Discuss Autohotkey related topics here. Not a place to share code.
Forum rules
Discuss Autohotkey related topics here. Not a place to share code.
JBensimon
Posts: 118
Joined: 19 Nov 2017, 11:19

Who is "MY"?

Post by JBensimon » 23 Jun 2022, 12:35

Many comments in the AutoHotkey source code are signed "MY". Just curious to know who that is?

JB

JBensimon
Posts: 118
Joined: 19 Nov 2017, 11:19

Re: Who is "MY"?

Post by JBensimon » 28 Jun 2022, 17:29

I don't think I understand: there's no user with the handle MY in the member list as far as I can tell, and who said anything about nationality?? I just wondered whether someone who appears to be (or to have been) involved in some way in AHK's development was somebody I may have run across in the forums.

gregster
Posts: 8916
Joined: 30 Sep 2013, 06:48

Re: Who is "MY"?

Post by gregster » 28 Jun 2022, 18:53

No idea what's wrong with the user that responded - it's an old account which started posting complete nonsense recently. We will have to close that account, I guess. I deleted their post.

I don't remember a MY at the moment. But some parts of the source code date back to the 2000s.

JBensimon
Posts: 118
Joined: 19 Nov 2017, 11:19

Re: Who is "MY"?

Post by JBensimon » 28 Jun 2022, 19:11

Thank you for the reply, gregster. I guess the MYstery lives on.

JB

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

Re: Who is "MY"?

Post by lexikos » 01 Jul 2022, 03:52

"MY:" or "My:" appears several times, usually followed by a comment that starts with something like "MSDN:", "From MSDN:", "JdeB said:", "AutoIt3:", "Info from AutoIt3 source:". Sometimes it is instead followed by a quote like that. Sometimes it's on its own, but it's possible that there was a quote above or below it in some previous version of the source code.

The vast majority of the code originating from the v1.0 source code was written by Chris Mallett. Any code that became part of the project was put there by him, whether he wrote it or copied it from somewhere. I'm pretty sure that's who "MY" refers to ("myself", from his perspective).

The member list of this forum isn't really relevant, as the AutoHotkey source code predates this version of the forum.

JBensimon
Posts: 118
Joined: 19 Nov 2017, 11:19

Re: Who is "MY"?

Post by JBensimon » 01 Jul 2022, 05:16

Thanks, lexikos. I was assuming that only the "unsigned" comments were Chris's.

Emile HasKey
Posts: 27
Joined: 06 Mar 2022, 17:45

Re: Who is "MY"?

Post by Emile HasKey » 02 Jul 2022, 20:02

I thought I'd take a crack at solving the MYstery.
This was written before Lexikos posted.

I didn't see anyone with the initials 'MY' in the credits for AutoIt or AutoHotkey:
https://www.autoitscript.com/autoit3/docs/credits.htm
https://lexikos.github.io/v2/docs/misc/Acknowledgements.htm

I checked the source code, and noticed 'My:' as well as 'MY:', implying the word 'my', not the initials 'MY'.
Most likely that would be the main developer, so one of Jonathan Bennett/Chris Mallett/Lexikos.

The references seemed quite old, so I compared the last version of AutoHotkey v1.0 against the latest version of AutoHotkey v1.1.
Below are copies of each line that contained 'My:'.

AHK v1.0:
https://github.com/AutoHotkey/AutoHotkey

Code: Select all

// even when you use TimerProc instead of processing WM_TIMER."  My: This is why all TimerProc type timers
	// My: This also applies to mouse events, so use it for them too:
		// My: Though it seems okay, for now, just to set it to be blank if the user omitted the 2nd param or
		// MY: Full filename is required, even if it's the main file, because some editors (EditPlus)
	// My: This does more harm that good (it causes the cursor to warp from the right side to the left
	// My: It seems best to use SW_FORCEMINIMIZE on OS's that support it because I have
		// My: In addition, this is probably better for some large controls (e.g. SysListView32) because
	// My: Probably not too much overhead to do this, though it probably would perform better to resize and
	// My: Seems safest to keep the limit just below 64K in case Win95 has problems with larger values.
	// My: Seems safest to keep the limit just below 64K in case Win95 has problems with larger values.
	// MY: It is definitely possible for GetForegroundWindow() to return NULL, even on XP.
	// MY: The AttachThreadInput method, when used by itself, seems to always
		// MY: Normally, it's suggested that you only need to attach the thread of the
		// does not have a message queue (My: ok here, since any window's thread MUST have a
// My: And since 32767 is what AutoIt3 passes to the API functions as the size (not the length, i.e.
AHK v1.1:
https://github.com/Lexikos/AutoHotkey_L

Code: Select all

// even when you use TimerProc instead of processing WM_TIMER."  My: This is why all TimerProc type timers
	// My: This also applies to mouse events, so use it for them too:
		// My: Though it seems okay, for now, just to set it to be blank if the user omitted the 2nd param or
		// MY: Full filename is required, even if it's the main file, because some editors (EditPlus)
	// My: This does more harm that good (it causes the cursor to warp from the right side to the left
	// My: It seems best to use SW_FORCEMINIMIZE on OS's that support it because I have
		// My: In addition, this is probably better for some large controls (e.g. SysListView32) because
	// My: Probably not too much overhead to do this, though it probably would perform better to resize and
	// MY: It is definitely possible for GetForegroundWindow() to return NULL, even on XP.
	// MY: The AttachThreadInput method, when used by itself, seems to always
		// MY: Normally, it's suggested that you only need to attach the thread of the
		// does not have a message queue (My: ok here, since any window's thread MUST have a
// My: And since 32767 is what AutoIt3 passes to the API functions as the size (not the length, i.e.
All the 'My:' references are from AHK v1.0, implying Jonathan Bennett or Chris Mallett.

'My:' was typically used in contrast to another source such as 'MSDN:'.
Hence why 'My:' appeared rarely.

Finally, in one 'My:' comment, it states: 'AutoIt3 does this too'.
Btw, AutoIt is still on version 3.
The comment, in context, wouldn't make sense if it was written by an AutoIt developer.
An additional piece of evidence, although weak, the comment uses the US spelling of 'realized', Jonathan Bennett is from the UK.
That suggests Chris Mallett.

From AHK v1.0:

Code: Select all

	case ACT_ENVSET:
		// MSDN: "If [the 2nd] parameter is NULL, the variable is deleted from the current process’s environment."
		// My: Though it seems okay, for now, just to set it to be blank if the user omitted the 2nd param or
		// left it blank (AutoIt3 does this too).  Also, no checking is currently done to ensure that ARG2
		// isn't longer than 32K, since future OSes may support longer env. vars.  SetEnvironmentVariable()
		// might return 0(fail) in that case anyway.  Also, ARG1 may be a dereferenced variable that resolves
		// to the name of an Env. Variable.  In any case, this name need not correspond to any existing
		// variable name within the script (i.e. script variables and env. variables aren't tied to each other
		// in any way).  This seems to be the most flexible approach, but are there any shortcomings?
		// The only one I can think of is that if the script tries to fetch the value of an env. var (perhaps
		// one that some other spawned program changed), and that var's name corresponds to the name of a
		// script var, the script var's value (if non-blank) will be fetched instead.
		// Note: It seems, at least under WinXP, that env variable names can contain spaces.  So it's best
		// not to validate ARG1 the same way we validate script variables (i.e. just let\
		// SetEnvironmentVariable()'s return value determine whether there's an error).  However, I just
		// realized that it's impossible to "retrieve" the value of an env var that has spaces (until now,
		// since the EnvGet command is available).
		return g_ErrorLevel->Assign(SetEnvironmentVariable(ARG1, ARG2) ? ERRORLEVEL_NONE : ERRORLEVEL_ERROR);
MYstery solved?

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

Re: Who is "MY"?

Post by lexikos » 03 Jul 2022, 02:09

Given that Chris took care to put a copyright notice at the top of each file, I'm fairly certain that only the four files that mention Jonathan Bennett under that notice contain code written by him. Of the 13 hits for "My:" in the v1.1 source code, only one of them is in one of these files.

... the comment uses the US spelling of 'realized', Jonathan Bennett is from the UK.
Australian English is more or less the same as UK English, but we use US keyboards.

"Realise" is purportedly more common here, but a search of the forum shows that I use "realize" more often.

I sometimes knowingly introduce spelling inconsistencies into the documentation and source code. ;)

JBensimon
Posts: 118
Joined: 19 Nov 2017, 11:19

Re: Who is "MY"?

Post by JBensimon » 03 Jul 2022, 13:03

Emile HasKey wrote:
02 Jul 2022, 20:02
I thought I'd take a crack at solving the MYstery.
...
MYstery solved?
Cool sleuthing, Emile! I at least am convinced.

JB

Post Reply

Return to “General Discussion”