I'm definitely leaning in this direction. I think it would probably be ok to leave some true constants, such as A_AhkVersion, A_PtrSize and what else there might be. Note, for many of the BIV's, there is not just simple function substitution, eg, the hotkey BIVs, it needs restructuring the hotkey concept. Ofc, it is not going to happen .you get the inevitable question, should *all* 'A_' variables be removed
It is not a good idea imo. (Surprised?)- A_MsgBoxResult / A_InputBoxResult for AHK v1/v2.
A_XXXResult will have the same limitiation, as will GetError(FuncName). Further A_XXXResult will either increase thread overhead or cause the same inconsitencies with interruptions as, eg, A_ThisHotkey. The solution is to store errorlevel in a variable when needed, so ofc, errorlevel shouldn't be used in v2 (for inputbox). The function(s) should return all that is needed. For example, something like this,ErrorLevel is positional
Code: Select all
[text, errorlevel] := inputbox(...)
; or
errorlevel := inputbox(textOut, ...)
As a side note, I'd prefer A_InputBoxResult (or another name) over errorlevel, but as indicated above, it would just be a bit less worse.
Cheers.
Edit: to be clear, my use if the word should indicates my preference, not my demand.