Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


getting input from command line

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,26573
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> getting input from command line
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 getting input from command line - 9/30/2005 12:40:38 AM   
  Brian32

 

Posts: 14
Score: 0
Joined: 7/13/2005
Status: offline
What's the command for getting input at the command line as opposed to Inputbox, example

FileInput = Inputbox("Enter the path and filename you wish to open:")

createobject("wscript.shell").run FileInput

Thanks
 
 
Post #: 1
 
 RE: getting input from command line - 9/30/2005 1:31:51 AM   
  mbouchard


Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
You would use Arguments, take a look at the Arguments Property (Wscript Object) in the WSH document, see pinned post.

Here is an ex.

somescript.vbs blah1 blah2 blah3

Set objArgs = WScript.Arguments
For I = 0 to objArgs.Count - 1
   WScript.Echo objArgs(I)
Next

_____________________________

Mike

For useful Scripting links see the Read Me First stickey!

Always remember Search is your friend.

(in reply to Brian32)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> getting input from command line Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts