Create project or global script functions like this (sample is VBScript):
Code:
' return expanded macro value if macro is defined, otherwise
' return an empty string
Function MacroOrEmpty(name)
Set m = vbld_AllMacros()(name)
If m Is Nothing Then
MacroOrEmpty = ""
Else
MacroOrEmpty = Application.ExpandMacrosAndScript(m.Value)
End If
End Function
' return expanded macro value as true/false if macro is defined, otherwise
' return False
Function MacroBool(name)
Set m = vbld_AllMacros()(name)
If m Is Nothing Then
MacroBool = False
Else
MacroBool = CBool(Application.ExpandMacrosAndScript(m.Value))
End If
End Function
' ...
then call from the subroutine as needed:
[MacroOrEmpty("XYZ")]
[MacroBool("ABC")]
...
http://www.kinook.com/VisBuildPro/Ma...ripteditor.htm
http://www.kinook.com/VisBuildPro/Manual/script.htm