Script Engine interface for multiple languages
First Claim
1. A method for interconnecting an application process with a scripting engine to execute a script for said application process, the method comprising:
- based upon a script type of a script, determining an appropriate scripting engine for executing said script from among plural different scripting engines available to an application process, each of said plural different scripting engines for executing scripts of a different script type;
creating an instance of said appropriate scripting engine;
populating said appropriate scripting engine instance with said script;
running said appropriate scripting engine instance to execute said script.
2 Assignments
0 Petitions
Accused Products
Abstract
The scripting engine interface provides the capability to interconnect any suitably written application or server with any scripting language. The implementation of the scripting engine itself (language, syntax, persistent format, execution model, and the like) is left entirely to the vendor, and the scripting engine need not come from the same vendor as the host application. The scripting engine interface implements this capability using a set of interfaces, the two most important ones being IActiveScriptSite (implemented by the host application) and IActiveScript (implemented by the language engine.) Together, these interfaces allow a host application to inform a scripting engine about the functionality that can be scripted and to define the scripts that the scripting engine should execute, either immediately or in response to user actions such as mouse clicks. The scripting engine interface redefines the handshake that is required between two specific types of software components in a manner not previously done. Unlike past scripting engine interfaces, which define a unique and proprietary way of hooking up to an application, the interface described here provides a universal hookup mechanism that is simple and direct.
72 Citations
23 Claims
-
1. A method for interconnecting an application process with a scripting engine to execute a script for said application process, the method comprising:
-
based upon a script type of a script, determining an appropriate scripting engine for executing said script from among plural different scripting engines available to an application process, each of said plural different scripting engines for executing scripts of a different script type;
creating an instance of said appropriate scripting engine;
populating said appropriate scripting engine instance with said script;
running said appropriate scripting engine instance to execute said script. - View Dependent Claims (2, 3, 4, 5, 6, 7)
installing a predefined scripting engine interface in said appropriate scripting engine instance; and
installing a predefined application scripting interface, which complements said predefined scripting engine interface, in said application process.
-
-
3. The method of claim 1 wherein said appropriate scripting engine interconnects with any suitably written application process, absent knowledge of the details of that application process.
-
4. The method of claim 1 wherein said running comprises:
automating by said appropriate scripting engine one or more exposed objects according to an automation model.
-
5. The method of claim 1 further comprising:
adding aggregatable script by run-time evaluation with respect to an exposed automatable object.
-
6. The method of claim 2 wherein said populating comprises:
transmitting messages from said application process to said scripting engine interface indicating one or more named items.
-
7. The method of claim 6 wherein said running comprises:
activating, in said appropriate scripting engine instance, a predefined response for an event for which one of the one or more named items is an event source.
-
8. A computer system with a host that allows programmatic control by an arbitrary engine executing a script, the system comprising:
-
a host including instructions for evaluating a script to determine an appropriate engine for executing the script to programmatically control an automation model exposed by the host, the host further including instructions for registering the script with the appropriate engine; and
one or more engine-independent methods supported on the host for interconnecting the host with the appropriate engine, said one or more engine-independent methods allowing interconnection between the host and any one or more of plural different engines, each of the plural different engines for executing scripts of a different script type. - View Dependent Claims (9, 10)
a type information retrieval method callable to obtain type information for the automation model exposed by the host.
-
-
10. The computer system of claim 8 wherein the one or more engine-independent methods include:
-
a start notification method callable to indicate to the host that the engine has begun executing the script;
a terminate notification method callable to indicate to the host that the engine has finished executing the script; and
an error notification method callable to indicate to the host that an execution error occurred during execution of the script.
-
-
11. A computer system with an engine for executing a script to programmatically control an arbitrary host, the system comprising:
-
an engine including instructions for executing a script to programmatically control one or more automatable features exposed through a host;
a host-independent script loading method supported on the engine callable to cause script loading by the engine; and
a host-independent state change method supported on the engine callable to put the engine into a given state. - View Dependent Claims (12, 13, 14, 15, 16, 17)
a host-independent automatable feature adding method callable to register with the engine one or more automatable features.
-
-
15. The computer system of claim 11 further comprising:
a host-independent type information adding method callable to register with the engine type information for one or more automatable features.
-
16. The computer system of claim 11 further comprising:
a host-independent automation script site registration method callable to register with the engine an automation script site.
-
17. The computer system of claim 13 further comprising:
a host-independent automatable feature adding method callable to register with the engine one or more automatable features, wherein the passed aggregatable script is evaluated with respect to an added automatable feature.
-
18. A method for a host to initialize an arbitrary engine to execute a script for the host, the method comprising:
-
exposing by a host one or more automatable features for programmatic control by an engine executing a script;
based upon a script type for a script, selecting by the host an engine for executing the script from among plural different engines available to the host, each of the plural different engines for executing scripts of a different script type;
causing by the host creation of the selected engine;
causing by the host loading of the script into the selected engine;
initiating by the host execution of the script by the selected engine. - View Dependent Claims (19, 20, 21)
registering with the selected engine one or more of the exposed automatable features; and
registering type information for the exposed automatable features.
-
-
20. The method of claim 18 further comprising:
-
exposing a script call back means supported on the host for providing type information about the exposed automatable features to the selected engine; and
registering the script call back means with the selected engine.
-
-
21. The method of claim 19 further comprising:
before initiating execution, sending by the host to the selected engine aggregatable script for adding to the loaded script by run-time evaluation with respect to a registered automatable feature.
-
22. A method for an engine to execute a script to programmatically control an arbitrary host, the method comprising:
-
providing an engine including instructions for executing a script;
exposing a host-independent script loading means supported on the engine for receiving a request to load a script, the script for programmatically controlling one or more automatable features exposed through a host;
exposing a host-independent scripting integration means supported on the engine for receiving information and commands from the host; and
executing by the engine the script. - View Dependent Claims (23)
requesting from the host type information for the one or more automatable features.
-
Specification