Using FloPrompter with VBScript

A school in Texas uses VBScript to help automate some of the steps for their student-run news cast. They wrote me asking if I could help figure out how to activate a FloPrompter window using VBScript. I was certainly glad to help even though I’d barely even heard of VBScript before and had never worked with it. All I can say is, thank goodness for Google!

So after a few emails back and forth with the technical guy at the school, and a lot of Google searching, we were able to come up with the right scripts. So in case you’re also inclined to do some automation using VBScript, I thought it would be good to share our findings.

If FloPrompter isn’t running yet and you wish to launch it, use the WshShell.Run command like this (note that I used the default installation folder, which may be different on your computer):

Set WshShell = CreateObject(“WScript.Shell”)

WshShell.Run (“””C:\Program Files\FloSpace\FloSpace FloPrompter 2.3\FloSpace.FloPrompter.exe”””)

What was tricky about getting this code right was the triple quotes at the beginning and end of the file path and name. Triple quotes??? I never would’ve guessed that. Every example I’d seen online used Notepad, which has some sort of magical keyword in Microsoft windows so not only doesn’t need the entire path, but also uses a single set of quotes. Finally, I happened upon a great blog entry written by Steve Schofield who explains this technical arcana, plus provides a lot of additional useful information:

Steve’s blog entry: “Executing an EXE inside a VBScript file that has spaces in the path

So now that you have FloPrompter running already, let’s assume that several other applications are also running, and you want to make sure that FloPrompter is the front-most window. This is how you do it:

Set WshShell = CreateObject(“WScript.Shell”)

WshShell.AppActivate (“FloSpace FloPrompter”)

This little trick for activating the FloPrompter window works because it contains the text “FloSpace FloPrompter” in the titlebar.

What’s cool is that after figuring out this arcane VBScript with the two gentlemen at the Texas school, one of them sent me this very kind note today:

“I know you and M. are working though this, but I just want to thank you again, this has to be one of the best product support instances I have had. Thank you again for making a great product and offering such great support.”

How nice is that?! Thanks, guys, but it just comes with the territory. I thank you for purchasing FloPrompter!

Comments are closed.