Showing results for April 2008 - Scripting Blog [archived]

Apr 30, 2008
0
0

Hey, Scripting Guy! How Can I Read a Text File and Extract All the Text Enclosed in Double Quote Marks?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I’m trying to write a script that can extract all the values found between a set of double quote marks. I know how to read the text file, and I know how to output any information that I find. However, I can’t figure out how to extract all the characters between a set of double quote marks. Can you help?-- TM Hey, TM. Before w...

Scripting Guy!scripting techniquesVBScript
Apr 29, 2008
0
0

Hey, Scripting Guy! How Can I Use Windows PowerShell to Determine the Number of Lines in a Text File?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I’m using Windows PowerShell to determine the record count (i.e., the number of lines) in a text file I just created. If the file has 2 lines, no problem; my script reports back a value of 2. If the file only has 1 line, however, I get back what looks to be the number of characters in the file. In other words, when I run the s...

Scripting Guy!Windows PowerShellscripting techniques
Apr 26, 2008
0
0

Hey, Scripting Guy! How Can I Install Fonts Using a Script?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! Is there any way I can install a font using VBScript?-- RS Hey, RS. As a general rule, the Scripting Guy who writes this column steers clear of popular culture. (Actually, it’s not just a general rule; popular culture has a restraining order which requires him to stay at least 100 yards away from it at all times.) Nevertheles...

Scripting Guy!VBScriptdesktop management
Apr 25, 2008
0
0

Hey, Scripting Guy! How Can I Pass Command-Line Arguments to a Batch File Started From a Script?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I am trying to write a script that requests multiple pieces of information from a user; I then want to call a batch file, using each piece of information as a separate command-line argument. Unfortunately, though, I can’t get this to work correctly. Can you help?-- BP Hey, BP. You know, at first we was not going to help, but ...

Scripting Guy!scripting techniquesVBScript
Apr 24, 2008
0
0

Hey, Scripting Guy! How Can I Randomly Assign a Font to Characters in a Word Document?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I’ve come up with a way to imitate handwriting in a document, but I need some help. Because real handwriting is characterized by variability, I had the idea of using four slightly-different fonts, taken from my actual handwriting, and then randomly assigning a font to each letter. I think that would imitate handwriting a littl...

Scripting Guy!VBScriptOffice