View Single Post
  #3  
Old 12-21-2006, 08:56 AM
jkeffer jkeffer is online now
Registered User
 
Join Date: 12-01-2006
Posts: 3
Isn't there an easier way to do this? I use a lot of nested macros in statements in the scripts that look like this:

"%UTILSPATH%\pscp.exe" -q -1 -r -l %%["TESTPCUSERNAME"+"%SHORTNAME%"]%% -pw %%["TESTPCPASSWORD"+"%SHORTNAME%"]%% "%BUILDDIR_RND%\Setup\*" "%%["TESTPC"+"%SHORTNAME%"]%%:%%["TESTPCDIR"+"%SHORTNAME%"]%%"

As you can see, I'm combining the %SHORTNAME% macro with a number of different strings. If I use a solution as suggested, this would look like:

"%UTILSPATH%\pscp.exe" -q -1 -r -l %% [vbld_AllMacros().Item("TESTPCUSERNAME" & vbld_AllMacros().Item("SHORTNAME").Value).Value] -pw [vbld_AllMacros().Item("TESTPCPASSWORD" & vbld_AllMacros().Item("SHORTNAME").Value).Value] "%BUILDDIR_RND%\Setup\*" [vbld_AllMacros().Item("TESTPC" & vbld_AllMacros().Item("SHORTNAME").Value).Value]:[vbld_AllMacros().Item("TESTPCDIR" & vbld_AllMacros().Item("SHORTNAME").Value).Value]

This is not very readable. Creating additional macros to contain the values before using them in a statement like the above defeats the purpose of nesting them in the first place.

Are there any other options?
Reply With Quote