Showing tag results for scripting techniques

Jan 20, 2006
Post comments count0
Post likes count0

How Can I Extract a Series of Characters Found in the Middle of a String?

ScriptingGuy1

Hey, Scripting Guy! I have a series of strings that look something like this: xxxxyyyyyyxx. How can I extract just the y’s?-- JB Hey, JB. And, yes, it is a Friday. But, hey, it’s just a coincidence that we happened to pick an easy question on a Friday, the day we’re itching to get out of here and go home and spend the weekend watching football a...

Scripting Guy!scripting techniquesVBScript
Jan 19, 2006
Post comments count0
Post likes count0

How Can I Tell Which Users are Connected to a Print Queue?

ScriptingGuy1

Hey, Scripting Guy! How can I tell which users are connected to a print queue?-- RE Hey, RE. You know, if your printers are anything like the ones the Scripting Guys are used to working with then it’s easy to tell which users are connected to a print queue: all you have to do is walk into the printer room and see who’s in there frantically looki...

Scripting Guy!scripting techniquesVBScript
Jan 12, 2006
Post comments count0
Post likes count0

How Can I Determine Which Day of the Year a Date Falls On?

ScriptingGuy1

Hey, Scripting Guy! How can I determine which day of the year a date falls on? For example, March 2, 2006 is the 61st day of the year.-- TW Hey, TW. You know, we almost feel guilty about answering this question. Why? Well, after all, we can answer it by writing just one line of code:Wscript.Echo DatePart("y", "3/2/2006") Note. So if it’s t...

Scripting Guy!scripting techniquesVBScript
Jan 6, 2006
Post comments count0
Post likes count0

How Can I Determine Which Text has been Selected in an HTA?

ScriptingGuy1

Hey, Scripting Guy! How can I determine which text has been selected in an HTA?-- DO Hey, DO. You know, most people think that writing the Hey, Scripting Guy! column every day is one of the most glamorous and exciting jobs in the world. And it probably would be if it wasn’t for the fact that the Scripting Guy who writes this column is so lazy. F...

Scripting Guy!scripting techniquesVBScript
Jan 3, 2006
Post comments count0
Post likes count0

How Can I Remove All the Blank Lines from a Text File?

ScriptingGuy1

Hey, Scripting Guy! How can I remove all the blank lines from a text file?-- RE Hey, RE. You know, back in the year 2002, when the Scripting Guys were still just lowercase scripting guys, we began working on the Microsoft Windows 2000 Scripting Guide. In putting together the book we faced enormous resistance from people who thought it was a mist...

Scripting Guy!scripting techniquesVBScript