Results 1 to 1 of 1

Thread: VB6 - Hosting Scripts

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    VB6 - Hosting Scripts

    This deals with a pretty common issue that has been described and discussed many times. However I haven't found an example here for people to study in order to get up to speed quickly when adding user scripting to their VB6 programs.

    The attached example is a VB6 program that uses the Microsoft Script Control to allow users to script its execution using VBScript.

    The program itself is pretty minimal, providing little more than the ability to print text to a Textbox in the program, display status text in a status line, and pause displaying a MsgBox. In a real program there would be a lot more scriptable functionality for users to manipulate.

    What the demo does show is how to provide a mini-IDE for the users to compose, edit, save, and load scripts through.


    A more interesting example might be to write a program that implements an "arena" containing two types of creatures. The user's script could provide each type of creature with "behavior" in response to inputs about its immediate environment. The creatures might battle, cooperate, or otherwise manipulate their environment - perhaps even multiply!
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width