Professional UI Solutions
Site Map   /  Register
 
 
 

Scripting Support in Prof-UIS Applications

Download the project (with Prof-UIS&ProfAuto MBCS Debug libs&dlls), 3003KB

Contents

Introduction

Quite often nowadays, applications feature support for scripting. In other words such applications can be programmatically customized. This makes the application more valuable and appealing to the customers since they can add new functionality or customize existing features with script code.

Prof-UIS significantly eases implementing scripting facilities by providing the developer with a set of OLE Automation objects. This makes possible to easily customize Prof-UIS applications programmatically using one of the scripting languages available within the Active Scripting framework like VBScript or JScript. For example, you can use a script that adds some toolbars, named commands, buttons, and message handlers at runtime. Such a script may be loaded from a file, database or from whatever you want.

ProfAuto

Scripting facilities in Prof-UIS are provided by ProfAuto, a standalone COM library which should be registered with the RegSvr32 utility before it is used. ProfAuto implements a set of Automation classes for customizing graphical user interface elements at runtime programmatically:

Automation class COM interface Description
CExtAutoWindow IExtAutoWindow Allows you to manage:
  • command collection
  • menu bar (a set of menu lines in case of MDI applications)
  • toolbar collection
  • command categories
  • styles and settings
CExtAutoCommandsCollection IExtAutoCommandsCollection Allows you to add a new command or remove an existing one, to check whether the command exists, and to get the command object by its name or numeric identifier.
CExtAutoCommand IExtAutoCommand Enables you to manage a particular command object, which may be assigned to one or more toolbar buttons and/or menu items.
CExtAutoToolbarsCollection IExtAutoToolbarsCollection Allows you to access the menu bar and toolbars in the frame window as well as to add and remove user-defined toolbars.
CExtAutoToolbar IExtAutoToolbar Gives access to the toolbar's/menu bar's properties. This interface also allows you to get the collection of original buttons and collection of active buttons associated with the toolbar/menu.
CExtAutoToolButtonsCollection IExtAutoToolButtonsCollection Enables you to manage a button collection, which is associated with a toolbar, menu bar, command category, or popup menu.