posted on May 31, 2006 19:41
Global options allow you to specify the location of an external tool. But what happens when you want to change that location at runtime, so
for example you could specify a different version of the external tool. Some
actions have options to do this, for example most compiler actions
allow you to choose the compiler version. For those that don't, you can
still modify a global option at runtime using some VBScript.
example (a real world example that came up on our news server
recently), we want to modify the settings to control which version of
InstallShield we are using.
Set opt = GetOptionsObject("InstallShield")
If not (opt is Nothing) then
opt.CompilerLocation = "c:\version1\compiler.exe"
opt.IFXLocation = "C:\version1\ifx.obl"
script editor has built in code completion, which makes it easy to find
the correct parameter for the call to GetOptionsObject.
You will also
find that code completion is enabled for the options object that is
returned from GetOptionsObject.
important thing to note about changing option's values at runtime, the
changes are not persisted, so when you close the application, those
changes are lost. This is intentional, so the default settings are