No problem, Digital Skream!
I was just curious. And I agree: [sarcasm] the most important goal of these routines is that others can use them too in other script. If a beginner reads one of your script, he will learn about almost all the possibilities of VBS. [/sarcasm]
I will analys this interrresting script again in the future. I will find many things that I don't know. Thanks.
About the concatenation of the string... I agree that using arrays and dictionary is much faster than "var = var & text". I myself made some experiments and attended the conversation.
What I don't undertsand is why you need to "concatenate" this string, (except for the fun of it).... because it's a static string!
Look:
in
HTAcode = "some line of code" _
& VbCrlf & "some more line of code" _
& VbCrlf & "some more line of code" _
& VbCrlf & "some more line of code"
There is no event, just a value given to a variable.
You could write it like that as well:
HTAcode = "some line of code" & VbCrlf & "some more line of code" & VbCrlf & "some more line of code" & VbCrlf & "some more line of code"
...but that's not easy to read in the editor.
In the case of creating an HTA the VbCrlf's are superflous. They are useful only if you want to read the HTA source later for checking.
So it can be like this:
HTAcode = "some line of code" _
& "some more line of code" _
& "some more line of code" _
& "some more line of code"
Or does it still takes more time than dashing them in a dictionary?
What does take time is this:
HTAcode = HTAcode & VbCrlf & "some line of code"
HTAcode = HTAcode & VbCrlf & "some more line of code"
HTAcode = HTAcode & VbCrlf & "some more line of code"
HTAcode = HTAcode & VbCrlf & "some more line of code"
...because the variable is everytime rewritten in the memory (as I understand). Not when you set it once.
Am I wrong?