View Single Post
  #3 (permalink)  
Old February 19th, 2008, 04:45 PM
twistedpair twistedpair is offline
Registered User
 
Join Date: Feb 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I needed this same info for a different use and found an answer that worked. After seeing this answer I'm loading a dictionary and using the constructed string to match the key but....

I seemed to be able to cast the constructed string as my predefined variable by using Eval.

example:

strRegValue = Eval("g_str" & strName & "RegValue")
strMessage = Eval("g_str" & strName & "Msg")
strCommand = Eval("g_str" & strName & "Command")

wscript.Echo strRegValue
wscript.Echo strMessage
wscript.Echo strCommand

Returned my g_str......... variables for each strname in my loop.

I'm new here so hate to speak out but seems to work for me..
Reply With Quote