Kinook Software Forums

Kinook Software Forums (http://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (http://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   Writing macro to file without evaluation (http://www.kinook.com/Forum/showthread.php?t=5402)

HippyCraig 01-27-2016 10:19 AM

Writing macro to file without evaluation
 
I have a macro and I set the option "Don't expand Macros or scripts..." Its actually the contents of a file I want to write out, I was using the File Write action and at the time its writing it starts to evaluate the macro, how can I prevent that.

kinook 01-27-2016 10:36 AM

You can't prevent expansion of macros/scripts within a Write File action. Either escape the file contents when storing in the macro (you can use the Read File action or vbld_GetFileContents script function) or use a Run Script action to write the raw macro value (you can use the FileSystemObject).

HippyCraig 01-27-2016 10:39 AM

how do I write out a macro in a script so its not evaluated? Is there a speciific function to write this marco and not evaluate it?

kinook 01-27-2016 08:02 PM

1 Attachment(s)
Just use the macro's Value property. See the attached sample and log.

HippyCraig 01-28-2016 08:57 AM

So I guess my concern was around vbld_AllMacros()("ABC").Value, isn't there a function that will write out a macro value with out evaluation of the macro.

kinook 01-28-2016 09:17 AM

The Value property is the raw macro value. Within a step field, any script or macro references in the text will automatically be expanded. In script code, you can use Step.ExpProperty, vbld_StepProp, or Application.ExpandMacrosAndScript to expand any macros or script in the value.

HippyCraig 01-28-2016 09:50 AM

Cool thanks for the help


All times are GMT -5. The time now is 09:17 AM.


Copyright 1999-2019 Kinook Software, Inc.