View Single Post
  #1  
Old 11-13-2014, 05:04 AM
raistlin raistlin is online now
Registered User
 
Join Date: 11-14-2008
Posts: 23
Unexpanded macro value

I am trying to unexpand the macro value. A macro with this value is parsed and i want to retain its value.

Code:
"BUILD_URL=http://jenkins/job/Test%20New%20NUnit%20Test%20Script/lastBuild"
To use the value above, i need to convert % to %% so VBP will not treat %20New% as an expandable macro, i think.

I tried to do it this way without avail.
Code:
Option Explicit

Dim build_url

build_url = "%BUILD_URL%"

If Len(build_url) > 0 Then

build_url = Replace( build_url, "%%", "%%%%" )
SetTemporaryMacroValue "BUILD_URL", build_url      <--- this is a subfunction i use in the script

End If
What can i do to use a macro with %20xxx%20 in it without expansion? Thanks.

What i need is the opposite of http://www.kinook.com/Forum/showthread.php?t=1233
Reply With Quote