antai,
Take a look at my ExtMsgBox UDF (link is in my sig - it allows you to specify the location of the dialog, as well as its colour, font, button text, etc, etc, etc.
M23
Netol,
That is a clear as mud.
Do you mean you wish a single button to run 5 separate checks? If so then what determines which check is run?
Please explain more clearly just what you are trying to do.
M23
Netol,
Why do you need to press a button in your own app? Surely all you need to is call the same code as would run if the button were pressed by an external operation.
M23
mr-es335,
In your first script, where do you store the return value from the DirCreate function? How can you check it when you have no idea what it is? All you are checking is the value of the $result variable - which you have just set to "" and so makes any checking completely pointless.
In the second set of scripts you are storing the return value, but I would question your use of $error as the variable name as it would appear to me to be the exact reverse of that and better named $iSuccess! And as to why the return value is not shown in the latter of the 2 scripts - perhaps you should look carefully at how many parameters are you passing to the MsgBox functions?
M23
mr-es335,
A personal view.
Global variables should be avoided if at all possible - unless there is an obvious benefit, such as the path to an ini file used by several functions within the script; or where not using a Global variable will overly complicate the script by forcing massive parameter bloat when calling functions.
Why so? Because of the possibility of inadvertantly altering these Global variables from within a function. Changing their value deliberately from within a function is, of course, one of the reasons to use Global variables - but the risk of doing so unintentionally is always present. The use of a suitable Hungarian naming convention can reduce the chances of this considerably - altering a variable commencing with "$g_****" should ring a few alarm bells!
So I would suggest minimal use of Global variables and the use of suitable names to help prevent possibly disastrous alterations to their content.
M23
ValentinM,
I can reproduce the problem - looking into it.
M23
Edit: Found the problem and know how to fix it. But need to make sure that the same bug does not appear elsewhere.
winkot,
And you are wrong. I suggest you go and read both of the links I posted above. The first points to the Help file and explains the fundamental difference between the 2 modes , while the second points to the Wiki tutorial which explains how you can interrupt functions in either mode.
M23
winkot,
I suggest you read the <GUI Reference> section of the Help file which goes into some detail as to the differences between the 2 modes. Basically IMO it is down to personal choice.
You mention that you cannot interrupt a running function in either mode. This is not strictly the case - can I point you to the "Interrupting a running function" tutorial in the Wiki where you will learn just how you can do this.
M23