Quote:

The non-local use of $ExeDir is intentional and explained.




Globals are a very bad idea, and should be avoided unless absolutely necessary, which in this case they are not.

Why not pass $exeDir as an optional parameter:
Code:
Function ALLHKU ($ALLHKUKeyname, $ALLHKUEntry, $ALLHKUExpression, $ALLHKUDatatype, $ALLHKUDefault, $ALLHKUDeleteLog,Optional $exeDir)
If Not $exedir
$ExeDir=@SCRIPTDIR
EndIf
...



If you really must use a global, then you should still declare it:
Code:
If Not IsDeclared($exeDir)
Global $exeDir
EndIf



This will allow your code to be used by people (like me) who use SetOption("Explicit","ON") in our scripts.

Quote:

Similarly, I'm aware that this makes log files



I think you miss the point. You start a log file using RedirectOuput(), but you never stop it. This means that anyone calling your function would have to know that they had to stop the redirection.

This is truly bad karma. Your function should perform a single task without interfering with the rest of the script. What we call a "black box" function. What if the main script is already redirecting output? You've just broken the main script!

Your function should not assume anything about logging, and you should certainly avoid issues with commands like RedirectOutput().

If you must log stuff withing the script, use FreeFileHandle(), Open(), WriteLine() anc Close() to ensure that you do not affect the main calling script.

Quote:

I'm not sure ... that I intend to chage the imbedding variables in my strings.





Not embedding variables is good practice. If you must embed variables then you can ensure that your function continues to work with people (like me) who use SetOption("NoVarsInStrings","ON") add the following to the top of your script to save the setting:
Code:
Dim $sNoVarsInStrings
$sNoVarsInStrings=SetOption("NoVarsInStrings","OFF")



At the end of your script just before you exit, restore the setting with:
Code:
$rc=SetOption("NoVarsInStrings",$sNoVarsInStrings)



Now, no-one is going to come round and knee-cap you (or even sue you) if you don't make these changes.

We ask for them becuase it will make your function portable, generic and give it a professional finish. It will mean that anyone can cut'n'paste your function into their own script and know that it will work first time with no odd side effects.