Hello,

I want to add scripting to my application. By scripting I mean
that the user of my application could write a script ( code) and guide the
way that my application is doing things.

The script should support programming structures such as if then else,
while, for, and variable assignment and also functions. The user may write
code to call functions in my code or in the DLLs that I am writing. In this
way user can control what they wanted to do by writing a script. My
requirement is very similar to VBA in office.



Can I use VB scripting? If yes, where can I find how I can add its
capability into my application? Is there any tutorial on a sample
application that show me how I can do this?



Is there any support for such scripting in Windows that I can use with MSVC?



I know that I can write use YACC and LEX or their variant tot build a new
grammar but I prefer that I use a well know scripting language.



Best regards

Re: Scripting by Ulrich

Ulrich
Tue Nov 08 06:07:10 CST 2005

[Note: dropped *.mfc and *.vbscript from the list and set p'up to mpvl.]

ma wrote:
> I know that I can write use YACC and LEX or their variant tot build a new
> grammar but I prefer that I use a well know scripting language.

When I hear this, I immediately think of Python and Lua, both of which are
notorious for such tasks. There are however many more such languages out
there (Perl, Ruby, Scheme come to mind and probably some BASIC variants),
many of which are portable to MS Windows, too.

Uli


Re: Scripting by Igor

Igor
Tue Nov 08 06:50:06 CST 2005

"ma" <ma@nowhere.com> wrote in message
news:eWyChpF5FHA.2192@TK2MSFTNGP14.phx.gbl
> Can I use VB scripting? If yes, where can I find how I can add its
> capability into my application? Is there any tutorial on a sample
> application that show me how I can do this?

http://msdn.microsoft.com/msdnmag/issues/0600/visualprog/
http://msdn.microsoft.com/library/en-us/dnclinic/html/scripting071299.asp

http://www.microsoft.com/msj/1099/visualprog/visualprog1099.aspx
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q221992
http://support.microsoft.com/kb/223139

You can actually host VBA in your application, development environment
and all. I believe you need to enter some kind of a licensing agreement
fith Microsoft to do that.
http://msdn.microsoft.com/isv/technology/vba/overview/default.aspx

--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925