Browse by Tags

Tagged Content List
  • Blog Post: Hey, Scripting Guy! How Can I Create a Self-Updating Text Box in an HTA?

    Hey, Scripting Guy! I have an HTA with three text boxes. In box 1 you enter a first name; in box 2 you enter a last name. I’d like box 3 to automatically update itself based on what you type in the other text boxes. For example, if you type Ken in box 1 then box 3 shows Ken . If you then type Myer in...
  • Blog Post: How Can I Temporarily Pause a Script in an HTA?

    Hey, Scripting Guy! How can I temporarily pause a script in an HTA? -- TJ Hey, TJ. You know, throughout history people have spent an enormous amount of time and energy searching for the meaning of life. The Scripting Guys have never taken part in this quest. Why not? Well, laziness aside, we know...
  • Blog Post: Hey, Scripting Guy! How Can I Automatically Move the Focus as Users Type in an HTA?

    I have an HTA that we use for creating and modifying user accounts. In that HTA we have a couple of phone number fields; each of these fields consists of three text boxes (one for the area code and two for the phone number). I’d like to set this up so that, as soon as someone has typed three digits into...
  • Blog Post: Weekend Scripter: Color-Coded Uptime Report

    Summary : Microsoft Scripting Guy, Ed Wilson, shows a script that produces red for down and green for up. Microsoft Scripting Guy, Ed Wilson, is here. Well, I have been playing around with this script off and on all week. Last night, my old high school friend John called to discuss plans for our upcoming...
  • Blog Post: How Can I Clear a List Box in an HTA?

    Hey, Scripting Guy! How can I clear a list box in an HTA? -- AK Hey, AK. For those of you who aren’t familiar with the term, an HTA - among other things - is a way to use Internet Explorer to provide a graphical user interface for your scripts. (If that still doesn’t answer your questions, don’t despair...
  • Blog Post: How Can I Dynamically Add Controls to an HTA?

    Hey, Scripting Guy! How can I dynamically add controls to an HTA? -- TR Hey, TR. Dum-de-dum-dum. Dum-de-dum-de - oh, wait : you were talking to us , weren’t you? Sorry; we saw the word “dynamically” and figured this question must have been addressed to someone else. When people hear the words Scripting...
  • Blog Post: How Can I Pass Command-Line Variables to an HTA When It Starts?

    Hey, Scripting Guy! How can I pass command-line variables to an HTA when it starts? -- DM Hey, DM. Ok, we admit it: you almost had us on this one. (Not that being able to stump the Scripting Guys is particularly hard, mind you.) We had no idea whether you could pass command-line variables to an HTA...
  • Blog Post: How Can I Dynamically Show Available Drive Letters in a List Box?

    Hey, Scripting Guy! I’m using an HTA as a drive-mapping application. I’d like to be clever about this and have the available drive letters appear in a list box. How can I dynamically show all the drive letters available on a computer? -- JT Hey, JT. You know, just the other day the Scripting Guy who...
  • Blog Post: How Can I Display a Default Message If Nothing Has Been Typed Into a Text Box?

    Hey, Scripting Guy! Sometimes you go to a Web page and you’ll see a text box that includes some instructions, something like “Please type a description in this box.” When you click on the text box, those instructions disappear; however, if you click on the box, don’t type in a description and then click...
  • Blog Post: How Can I Cause a Script to Run Inside an HTA Any Time a User Presses ENTER?

    Hey, Scripting Guy! How can I cause a script to run inside an HTA any time a user presses ENTER? -- JJ Hey, JJ. Before answering your question we should state, for the record, that the Scripting Guys are unanimously opposed to the recent decision by the International Astronomical Union (IAU) to remove...
  • Blog Post: How Can I Print Just the Text Area of an HTA?

    Hey, Scripting Guy! I have an HTA where information gets written to a text area. How can I print just the information found in that text area? -- DS Hey, DS. We want you to level with us here: are the Scripting Guys dead? We ask that because we saw the movie The Sixth Sense a few years ago and we...
  • Blog Post: How Can I Get the Actual Text of a List Box or Dropdown List Option?

    Hey, Scripting Guy! In my HTA, how can I get the actual text of a list box or dropdown list option? -- MM Hey, MM. You might be familiar with an old Mac Davis song, a song that starts off like this: Oh Lord it's hard to be humble When you're perfect in every way Now, admittedly, the Scripting...
  • Blog Post: How Can I Dynamically Hide and Show a Control in an HTA?

    Hey, Scripting Guy! How can I dynamically hide and show a control in an HTA? -- R L-K Hey, R L-K. To tell you the truth, we’re a little distracted today. Admittedly, we’re a little distracted pretty much every day. However, today is different: today the Scripting Guy who writes this column in sitting...
  • Blog Post: How Can I Specify a Window Size for My HTA?

    Hey, Scripting Guy! How can I specify a particular window size for my HTA? -- RN Hey, RN. We can’t speak for Dear Abby, Ann Landers or any other daily columnist, but the Scripting Guys are always on the lookout for a question that can be answered using a single line of code. That’s the Holy Grail...
  • Blog Post: How Can I Periodically Refresh a Web Page?

    Hey, Scripting Guy! How can I periodically refresh a Web page? -- TZ Hey, TZ. You know, the last couple of weeks have been very difficult for the Scripting Guys; after all, we were positive that one of us would be nominated to become the next Chief Justice of the United States Supreme Court. (We even...
  • Blog Post: How Can Users Type Data Into an HTA Without Using Text Boxes?

    Hey, Scripting Guy! I use HTAs as data entry forms, but I don’t really like the way the forms look when they have a bunch of text boxes on them. How can I allow my users to type data into a form without using text boxes? -- JJ Hey, JJ. Before we begin we should, in all fairness, give you a chance...
  • Blog Post: Hey, Scripting Guy! How Can I Load a Drop-Down List From a Text File?

    Hey, Scripting Guy! I have a text file that has a list of different store numbers and I would like to be able to populate a drop down list of an HTA. -- MH Hi MH, The basic task of reading data from a text file and using it to populate a drop-down list is pretty straightforward. Below is the code...
  • Blog Post: Hey, Scripting Guy! Can I Create a GUI for a Windows PowerShell Script?

    Hey, Scripting Guy! I know this may sound like a strange question, but I would like to create a graphical user interface for a Windows PowerShell script. I could do these kinds of things using a HTML Application (HTA) file, but I like writing Windows PowerShell scripts. If I could use some sort of functionality...
  • Blog Post: How Can I Position the Cursor in a Specific Text Box Each Time I Start an HTA?

    Hey, Scripting Guy! How can I position the cursor in a specific text box each time I start an HTA? -- BM Hey, BM. You know, if the Scripting Guy who writes this column has any regrets in life it’s that he didn’t become a Theoretical Physicist Guy. Why? Well, among other things, theoretical physicists...
  • Blog Post: How Can I Display Multiple Lines of Output in a Web Page?

    Hey, Scripting Guy! How do I get multiple lines of output in a Web page using the Document.Body.InnerHTML property? I can only get one line of output on my page. -- CM Hey, CM. Sounds like you’re creating an instance of Internet Explorer and trying to display script output in it. And we’re willing...
  • Blog Post: Hey, Scripting Guy! How Can I Save Information in an HTA as a Tab-Separated Values File?

    Hey, Scripting Guy! I have an HTA that includes five text boxes. How can I save the values in those text boxes to a tab-separated values file? -- EL Hey, EL. According to their itinerary, the Scripting Guys should land in Paris sometime around 8:00 AM on Friday, November 9 th . OK, technically, Paris...
  • Blog Post: Use PowerShell to Create a Color Server Uptime Report

    Summary : Microsoft Scripting Guy, Ed Wilson, shows how to use Windows PowerShell to create a color HTML server uptime report. Hey, Scripting Guy! I hope you do not mind me writing to you—I have a rather unusual request. I like the server uptime report that you created the other day, but when...
  • Blog Post: How Can I Dynamically Link Two Drop-Down Lists?

    Hey, Scripting Guy! How can I configure a pair of dropdown lists in an HTA so that, when I change the selection in the first list, the options available in the second list also change? -- PC Hey, PC. Before we get going today, we’d like to make it clear that the Scripting Guy who writes this column...
  • Blog Post: How Can I Change the Color of the Scrollbars in an HTA?

    Hey, Scripting Guy! How can I change the color of the scrollbars in an HTA? -- IR Hey, IR. How many times have you thought to yourself, “Gee, the Scripting Guy who writes that column is so smart; how come he isn’t rich?” (OK, true, you’ve probably never thought that. But just play along, OK?) Well...
  • Blog Post: Hey, Scripting Guy! How Can I Create an HTA to Do Temperature Conversions?

    Hey, Scripting Guy! I read with interest your "blog from down under," and I was interested in your function that converts Fahrenheit to Celsius. My wife and I are going on vacation to Germany, and I want to be able to do metric conversions. The problem, however, is that I do not want to install Windows...