Page 1 of 1
Implications of AlternateLanguages
Posted: Fri Jul 11, 2008 8:30 am
by bjb007
The list of alternate languages on my computer
includes VBScript.
I understand that my Rev prog can use scripts
written in VBScript.
Information on this subject seems sparse
Some ideas for getting more familiar with this
would be appreciated.
BTW should I assume that my users will have
VBScript or is it available for download in cases
where they don't already have it?
Are VBScript and VBA the same thing?
Posted: Fri Jul 11, 2008 1:30 pm
by BvG
VBScript (Visual Basic Script) is Microsoft's answer to AppleScript. It shares some functionality with VBA (Visual Basic for Applications) but not all features are available. VBScript is installed by default in Windows XP, I don't know about other versions of Windows.
Alternate Languages
Posted: Fri Jul 11, 2008 2:09 pm
by bjb007
BvG
Thanks for the info.
Any recommendations for reading on
the subject of using VBScript with Rev?
Alternate Languages
Posted: Sun Jul 13, 2008 7:21 pm
by bjb007
I have this comment from my nephew
(brilliant structural engineer and programmer).
VBScript is a bugger in comparison to VBA.
VBScript is hit or miss interpreted language
with no syntax checking until it crashes.
Looks like (another) one to Apple?
Posted: Sun Jul 13, 2008 11:08 pm
by mwieder
Your nephew is spot on. However, VBScript does have wide support and is in some cases the *only* way to achieve certain automation tasks in Windows environments. I'm able to automate MSOffice tasks (MSWord, PowerPoint) by spawning VBScripts directly from rev. Not much fun, but when you gotta you gotta.
Alternate Languages
Posted: Mon Jul 14, 2008 5:29 am
by bjb007
mwieder
You seem to know something about this
alternate language thing so perhaps you
could tell me about VBA.
Is it VB with a different name?
Is it a cut-down VB?
Can I run an Excel sheet with
VBA macros from a Rev programme?
And if so any suggestions for reading
about how to do it?
And the likelyhood of converting the
Excel macros to a Rev prog?
Posted: Mon Jul 14, 2008 12:05 pm
by Janschenkel
Using VBScript you can most certainly steer Excel. In the past, we did that by writing out a VBScript to a temporary file, and then executing that using the 'shell' function. See Ken Ray's excellent tips for some inspiration:
http://www.sonsothunder.com/devres/revo ... on.htm#iac
Of coutrse, Revolution 2.9 made this a lot easier - for more information on how Bryan McCormick uses the alternateLanguages feature, see this Rev Newsletter article:
http://www.runrev.com/newsletter/june/i ... etter1.php
Hope this helped,
Jan Schenkel.
Alternate Languages
Posted: Mon Jul 14, 2008 4:37 pm
by bjb007
Thanks Jan.
This is going to be fun -- exporting data
from Rev to a neural network spreadsheet.
Posted: Mon Jul 14, 2008 7:40 pm
by mwieder
That does indeed sound like fun. Keep us posted on your progress.
FWIW, the best documentation I've found on VBScript is unfortunately from Microsoft.
http://www.microsoft.com/DOWNLOADS/deta ... laylang=en
and
http://www.microsoft.com/DOWNLOADS/deta ... laylang=en
and there's an IDE for doing VBScript work at
http://www.vbsedit.com/