 




<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The VBScript Network and Systems Administrator&#039;s Cafe &#187; inputbox</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/tag/inputbox/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator</link>
	<description></description>
	<lastBuildDate>Tue, 11 Oct 2011 18:36:53 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>A simple way to gather keyboard input from with in a VBScript</title>
		<link>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/a-simple-way-to-gather-keyboard-input-from-with-in-a-vbscript/</link>
		<comments>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/a-simple-way-to-gather-keyboard-input-from-with-in-a-vbscript/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 13:43:20 +0000</pubDate>
		<dc:creator>Jerry Lees</dc:creator>
				<category><![CDATA[Input]]></category>
		<category><![CDATA[inputbox]]></category>
		<category><![CDATA[User Input]]></category>
		<category><![CDATA[VBScript]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/a-simple-way-to-gather-keyboard-input-from-with-in-a-vbscript/</guid>
		<description><![CDATA[While entering data at the command line for a script to use is sometimes helpful like we discussed in  How to use command line arguments in VBScript via the Wscript.Arguments Object. However, if you recall in a later blog entry, Using the windows file dialog box in VBScript to provide file selections and populate script options , [...]]]></description>
				<content:encoded><![CDATA[<p>While entering data at the command line for a script to use is sometimes helpful like we discussed in  <a href="http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/how-to-use-command-line-arguments-in-vbscript-via-the-wscriptarguments-object/" rel="bookmark" title="Permanent Link to How to use command line arguments in VBScript via the Wscript.Arguments Object">How to use command line arguments in VBScript via the Wscript.Arguments Object</a>. However, if you recall in a later blog entry, <a href="http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/using-the-windows-file-dialog-box-in-vbscript-to-provide-file-selections-and-populate-script-options/" rel="bookmark" title="Permanent Link to Using the windows file dialog box in VBScript to provide file selections and populate script options">Using the windows file dialog box in VBScript to provide file selections and populate script options</a> , I mentioned It&#8217;s sometimes just not practical! In that entry we discussed a slick way to use the standard windows functions to have a user select a file&#8211; but even that sometimes isn&#8217;t good enough. Sometimes you just need the user to enter other stuff into the program.</p>
<p>Well, you can easily do this with in VBScript as well, and it&#8217;s just one line of code! You use the InputBox command and it&#8217;s that easy. You simply assign the return to a variable of your choosing and specify first a Prompt (or directions) to a user and then you optionally can specify a title for the window that will be displayed. Below is an example that places the return of the InputBox command in a variable called <em>Str</em>, displays a prompt saying &#8220;<em>Your Prompt here.</em>&#8221; and has &#8220;<em>Window Title here</em>&#8221; in the title bar.</p>
<p><font color="#0000ff">Str = Inputbox(&#8220;Your Prompt here.&#8221;, &#8220;Window Title here&#8221;)</font></p>
<p>There are other options as well, but they are typically not used in most cases. More information can be obtained from Microsoft in their <a href="http://msdn.microsoft.com/en-us/library/3yfdhzk5(VS.85).aspx" target="_blank">InputBox Function documentation</a>.</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/a-simple-way-to-gather-keyboard-input-from-with-in-a-vbscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
