{"id":15,"date":"2007-10-17T21:49:39","date_gmt":"2007-10-18T01:49:39","guid":{"rendered":"http:\/\/www.flospace.com\/blog\/?p=15"},"modified":"2007-10-17T21:50:43","modified_gmt":"2007-10-18T01:50:43","slug":"using-floprompter-with-vbscript","status":"publish","type":"post","link":"http:\/\/www.flospace.com\/blog\/?p=15","title":{"rendered":"Using FloPrompter with VBScript"},"content":{"rendered":"<p>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&#8217;d barely even heard of VBScript before and had never worked with it. All I can say is, thank goodness for Google!<\/p>\n<p>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&#8217;re also inclined to do some automation using VBScript, I thought it would be good to share our findings.<\/p>\n<p>If FloPrompter isn&#8217;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):<\/p>\n<blockquote><p>Set WshShell = CreateObject(&#8220;WScript.Shell&#8221;)<\/p>\n<p>WshShell.Run (&#8220;&#8221;&#8221;C:\\Program Files\\FloSpace\\FloSpace FloPrompter 2.3\\FloSpace.FloPrompter.exe&#8221;&#8221;&#8221;)<\/p><\/blockquote>\n<p>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&#8217;ve guessed that. Every example I&#8217;d seen online used Notepad, which has some sort of magical keyword in Microsoft windows so not only doesn&#8217;t need the entire path, but also uses a single set of quotes. Finally, I happened upon a great blog entry written by <strong>Steve Schofield<\/strong> who explains this technical arcana, plus provides a lot of additional useful information:<\/p>\n<blockquote><p>Steve&#8217;s blog entry: &#8220;<a href=\"http:\/\/weblogs.asp.net\/steveschofield\/archive\/2004\/03\/14\/89240.aspx\" target=\"_blank\">Executing an EXE inside a VBScript file that has spaces in the path<\/a>&#8220;<\/p><\/blockquote>\n<p>So now that you have FloPrompter running already, let&#8217;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:<\/p>\n<blockquote><p>Set WshShell = CreateObject(&#8220;WScript.Shell&#8221;)<\/p>\n<p>WshShell.AppActivate (&#8220;FloSpace FloPrompter&#8221;)<\/p><\/blockquote>\n<p>This little trick for activating the FloPrompter window works because it contains the text &#8220;FloSpace FloPrompter&#8221; in the titlebar.<\/p>\n<p>What&#8217;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:<\/p>\n<blockquote><p>&#8220;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.&#8221;<\/p><\/blockquote>\n<p>How nice is that?! Thanks, guys, but it just comes with the territory. I thank <em><strong>you <\/strong><\/em>for purchasing FloPrompter!<\/p>\n<blockquote><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;d barely even heard of VBScript before and had never worked [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,6,5],"tags":[18],"class_list":["post-15","post","type-post","status-publish","format-standard","hentry","category-floprompter","category-innovative-uses","category-tips-tricks","tag-vbscript"],"_links":{"self":[{"href":"http:\/\/www.flospace.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/15","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.flospace.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.flospace.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.flospace.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.flospace.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=15"}],"version-history":[{"count":0,"href":"http:\/\/www.flospace.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/15\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.flospace.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=15"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.flospace.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=15"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.flospace.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=15"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}