experience with VBScript on Vista needed

Ken Ray kray at sonsothunder.com
Sun Jun 14 02:51:49 EDT 2009


> Hi Ken,
> 
> After you gave this answer to Tiemo about a week or so ago, I decided to
> play with running some vbscript out of rev 2.9+. The only thing I get is
> "execution error." I tried your above script and get the error and then
> reduced it down to two hard coded lines:
> 
> put format("set WshShell = WScript.CreateObject(\"WScript.Shell\")") into
> tVBS
> put tVBS & CR & format("WshShell.AppActivate \"Internet Explorer\")") into
> tVBS
> do tVBS as "VBScript"
> 
> I tried CRLF instead of CR (thinking maybe it was a line ending issue), put
> one at the end of the second line, etc. No matter what I do I get the
> execution error. IE is running and, of course, clicking on a file with these
> same two lines and .vbs extension runs without error and brings IE to front.
> 
> 
> What's the trick? ;-) Testing on Vista.

Hmm... it turns out that there must be something related to working with the
WshShell that isn't supported *inside* Rev for the "do as" command. You'll
have to use the older (pre-2.9) version of the script instead (which *does*
work, althought there's a slight pause as it has to write out the file and
execute it first).

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/





More information about the use-livecode mailing list