How to pass Arguments from Batch file to Vbsc

March 11, 2011 at 23:48:53
Specs: Windows 7
I would like to know if it's possible to pass an array of variables to vbscript from a batch file. If yes, can you provide me a sample code on batch and vbscript?

The batch file is used only to call the vbscript.

My question is actually related to this

0 down vote favorite

Hi! Guys. I'm trying to minimize the number of vbs files that I have for a number of imacro testing I have. I'm fairly new to scripting and I'm still learning to make my code simpler.

Summary: 1. I have one imacros (iim file) of which the URL parameter is being supplied by a vbs file. I have 47 parameters ie. http://www.domain.com/page.jsp?{{url}}

the value of {{url}} is supplied by different vbs file with the same code but different parameters using iimset, ie.

var=iim1.iimset("url","link1"}}. This part is the only difference in all of my 47 vbs file. Ref - http://wiki.imacros.net/iimSet%28%29

1. all of these vbscript is being called by batch file with interval of 15 minutes each.

My question is 1. Can I pass the variable from batch file to vbscript? 2. Or is there another easy way to do this?

I've been looking for answers for two days already. I hope you guys can lend a hand. Thank you so much again.


See More: How to pass Arguments from Batch file to Vbsc

Report •


#1
March 13, 2011 at 07:43:45
if it's possible to pass an array of variables to vbscript from a batch file.
Two methods off the top of my head:
1. Give the relevant information to your script though arguments. (Capped at 8191 characters.)
2. Have your script access the information though its environment.

How To Ask Questions The Smart Way


Report •
Related Solutions


Ask Question