100 likes | 125 Views
Scripting. In this presentation… centric’s scripting support. VBScript and JScript. Scripting Editor. Scripting. New scripting support centric 8 offers a full scripting environment supporting both VBScript and JScript. Add new functionality. Integrate with third party applications.
E N D
Scripting • In this presentation… • centric’s scripting support. • VBScript and JScript. • Scripting Editor.
Scripting • New scripting support • centric 8 offers a full scripting environment supporting both VBScript and JScript. • Add new functionality. • Integrate with third party applications.
Scripting • New scripting support (cont’d) • Mix any combination of looksoftware macros, JScript and VBScript. • Scripting environment provides intellisense prompting, syntax checking and object model access, and method support. • Integrated debugging supports breakpoints, watch variables, stepped execution and execution contexts (Microsoft Script Debugging needs to be installed).
Scripting • Scripts • A program that contains a set of scripting commands. • More powerful than macros as they allow you to use objects that other users have created. • centric 8 supports both VBScript and JScript. • For further information on VBScript and Jscript visit the language reference manuals at Microsoft’s MSDN website.
Scripting • Script Editor • Used to: • Define scripts associated with Designer controls. • Integrate with third party applications. • Set the properties of controls on the current screen. • Controlling interface navigation. • Overriding instance level properties. • Manipulating custom variables. • Linking scripts to events.
Scripting • centric’s Object Model • Objects • An object can be viewed as a container for properties, events and methods. • Properties • Objects generally have properties. A property has a name, such as Caption, and it also has a Type such a string. The name is what the property is referred to as when using it via scripting or macros. • Events • In order to respond to events occurring to objects at runtime, objects need a way of telling something has happened. This is done through the concept of Events. • Methods • Objects can also have methods. A method is like a function or procedure that can be called from a macro or script to perform some specific functionality on the object.
Scripting • Scripting Fundamentals • Scripts are executed top to bottom unless flow constructs are used (if or for). • Scripts may also have functions (JScript) or procedures (VBScript). • Call script functions/procedures from your scripts or they can be called in response to a centric event. • To call a function/procedure specify the script name then add a (.) dot, and then follow with the function/procedure name. for(i = 1; i <= 10; i++) { MsgBox(i); } In VBScript, you would use: for i = 1 to 10 MsgBox I next
Summary • Summary • New scripting editor supports VBScript and JScript. • More powerful than macros as they allow you to use objects that other users have created.
Workshop 2 centric 8 Training