Ah, the AutoIt compatibility slipped my mind; you're right, of course.
I wasn't going to pursue this - don't wanna waste your time - but in case there's something I'm not getting right: isn't it the same with the example below?
From the Help file:
Code: Select all
MsgBox, Text
MsgBox [, Options, Title, Text, Timeout]
From user's point of view, first parameter changes its meaning according to the command variant used. There are no extra commas in the single-parameter variant, so what appears to be third parameter in 3-4 parameter mode becomes first (and only) parameter in single-parameter mode. What happens internally (in AHK's code) is completely opaque to the user. That's the implementation detail you mentioned above.
Same thing I suggested for the function: in single-parameter mode, Options would become Text, otherwise it would act accordingly.
Command turned into function, with similar syntax, with only the addition of File and IconID for the user defined-icon mode.
Code: Select all
MsgBox(Text)
MsgBox(Options , Title, Text [,Timeout, File, IconID])
The only remaining issue would be HwndOwner, which - without hitting MSDN - I suppose would be the actual GUI that owns the message box, which may not be the main GUI. That could be an extra parameter as well - when missing, it would default to main GUI's HWND (if any) or module's HWND:
Code: Select all
MsgBox(Options , Title, Text [,Timeout, File, IconID, HwndOwner])
Well, that's it. Hope anyone reading this will understand what we're talking about. It'd be nice to see this in v1.1 sometime but if not we can always implement it independently as a library.
Now off to work with me too!