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 there a way to clear macros from a vbscript (https://www.kinook.com/Forum/showthread.php?t=540)

Chudson 08-17-2004 08:42 AM

is there a way to clear macros from a vbscript
 
I am trying to clear or delete a macro and then reuse it.
I have tried setting the macro to ""
vbld_AllMacros.Item("filename").value = ""
but this results in a tab character then the value

ex:
instead of:
c:\test.txt
I get
c:\test.txt


I also have tried settting the value to null and that didnt work.

Thanks in advance.
Chris

Chudson 08-17-2004 09:01 AM

found out a way
 
'this sets the macro equal to "" & tab
vbld_AllMacros.Item("filename").value = ""
'This removes the tab
vbld_NextDelimValue("filename")


full example
set project level macro with no value:
filename

'in the script
'this clears the value in the macro if it has one and then
'sets the new value
if vbld_AllMacros.Item("filename").value <> "" then
vbld_AllMacros.Item("filename").value = ""
vbld_NextDelimValue("filename")
end if

vbld_AddDelimValue "filename", myfile


All times are GMT -5. The time now is 01:55 PM.


Copyright © 1999-2023 Kinook Software, Inc.