Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   Is it possible to use macros in the Script Editor, and if so, how? (https://www.kinook.com/Forum/showthread.php?t=3136)

ambalboa 10-18-2007 03:43 PM

Is it possible to use macros in the Script Editor, and if so, how?
 
I've been reading the manual and if I understand it correctly, I cannot reference any macros to use their value. Is this correct? If not, how do you call a macro? I am trying to use the FAILSTEP_NAME macro, among others on the step tab in the script editor. So far, I am just not able to. I am following what I did on the 'Run Script' action steps but that doesn't work. Thank you in advance.

kinook 10-18-2007 04:23 PM

To access a (raw) macro value from script code:

Application.Macros(vbldMacroTemporary)("ABC").Value

or

vbld_AllMacros()("XYZ").Value

http://www.visualbuild.com/Manual/macrosproperty.htm
http://www.visualbuild.com/Manual/sysscriptmisc.htm


Or, to expand the macro's value (any macros or script expressions it references):

Application.ExpandMacrosAndScript("%MYMACRO%")

http://www.visualbuild.com/Manual/scripteditor.htm
http://www.visualbuild.com/Manual/specialchars.htm


In the case of FAILSTEP_NAME, it's more direct to just use the FailedStep object (FailedStep.Name) rather than that macro.
http://www.visualbuild.com/Manual/objectmodel.htm


All times are GMT -5. The time now is 04:21 PM.


Copyright © 1999-2023 Kinook Software, Inc.