Scripter Studio
Manual
December, 2010
TMS SOFTWARE
Scripter Studio Manual
Copyright (c) 2010 by tmssoftware.com bvba
Web: http://www.tmssoftware.com
E-mail: info@tmssoftware.com
Table of Contents
Chapter I Introduction 6
................................................................................................................................... 61 Overview
................................................................................................................................... 72 Copyright Notice
................................................................................................................................... 73 What's New
................................................................................................................................... 114 Manual Installation
................................................................................................................................... 125 Getting Support
................................................................................................................................... 136 Version 1.5: News about RTTI
.......................................................................................................................................................... 13Registering a class in scripter
.......................................................................................................................................................... 13Registering a record in scripter
.......................................................................................................................................................... 14What is not supported
Chapter II Scripter Studio Pro 16
................................................................................................................................... 161 Basic concepts
................................................................................................................................... 162 Differences between Scripter Studio and Scripter Studio Pro
................................................................................................................................... 183 Component overview
................................................................................................................................... 194 The TIDEScripter component
................................................................................................................................... 195 Migrating from Scripter Studio to Scripter Studio Pro
Chapter III Integrated Development Environment 21
................................................................................................................................... 211 Running the IDE: TIDEDialog component
................................................................................................................................... 212 Overview of the IDE
.......................................................................................................................................................... 22Managing projects and files
.......................................................................................................................................................... 23Editing the script in code editor
.......................................................................................................................................................... 24Designing forms
.......................................................................................................................................................... 25Running and debugging scripts
................................................................................................................................... 263 Building your own IDE
.......................................................................................................................................................... 26IDE Components available
.......................................................................................................................................................... 27The TIDEEngine component
.......................................................................................................................................................... 28Basic steps to build a custom IDE
.......................................................................................................................................................... 29Using ready-to-use inspector and palette forms
.......................................................................................................................................................... 29Using ready-to-use actions
................................................................................................................................... 294 Using TIDEEngine component programatically
.......................................................................................................................................................... 29Creating a new project
.......................................................................................................................................................... 30Adding/removing units (scripts and forms) to the project
.......................................................................................................................................................... 30Executing a project programatically
.......................................................................................................................................................... 31Managing units and changing its properties
.......................................................................................................................................................... 31Setting the active unit in the IDE
.......................................................................................................................................................... 31Running and debugging a project
.......................................................................................................................................................... 32Methods for end-user interaction - open, save dialogs, etc.
................................................................................................................................... 335 Registering components in the IDE
.......................................................................................................................................................... 33Retrieving existing registered components
.......................................................................................................................................................... 34Registering/Unregistering standard tabs
Scripter Studio ManualI
© 2002-2010 - TMS Software
.......................................................................................................................................................... 34Register new components
................................................................................................................................... 356 Storing units in a database (alternative to files)
.......................................................................................................................................................... 35Replacing save/load operations
.......................................................................................................................................................... 36Replacing open/save dialogs
.......................................................................................................................................................... 38Checking if a file name is valid
Chapter IV Language Features 40
................................................................................................................................... 401 Pascal syntax
.......................................................................................................................................................... 40Overview
.......................................................................................................................................................... 40Script structure
.......................................................................................................................................................... 41Identifiers
.......................................................................................................................................................... 41Assign statements
.......................................................................................................................................................... 41Character strings
.......................................................................................................................................................... 41Comments
.......................................................................................................................................................... 42Variables
.......................................................................................................................................................... 42Indexes
.......................................................................................................................................................... 42Arrays
.......................................................................................................................................................... 43If statements
.......................................................................................................................................................... 43while statements
.......................................................................................................................................................... 43repeat statements
.......................................................................................................................................................... 44for statements
.......................................................................................................................................................... 44case statements
.......................................................................................................................................................... 44function and procedure declaration
................................................................................................................................... 452 Basic syntax
.......................................................................................................................................................... 45Overview
.......................................................................................................................................................... 45Script structure
.......................................................................................................................................................... 46Identifiers
.......................................................................................................................................................... 46Assign statements
.......................................................................................................................................................... 46New statement
.......................................................................................................................................................... 46Character strings
.......................................................................................................................................................... 47Comments
.......................................................................................................................................................... 47Variables
.......................................................................................................................................................... 48Indexes
.......................................................................................................................................................... 48Arrays
.......................................................................................................................................................... 48If statements
.......................................................................................................................................................... 48while statements
.......................................................................................................................................................... 49loop statements
.......................................................................................................................................................... 49for statements
.......................................................................................................................................................... 50select case statements
.......................................................................................................................................................... 50function and sub declaration
................................................................................................................................... 513 Calling dll functions
.......................................................................................................................................................... 51Overview
.......................................................................................................................................................... 51Pascal syntax
.......................................................................................................................................................... 52Basic syntax
.......................................................................................................................................................... 52Supported types
Chapter V Working with scripter 55
................................................................................................................................... 551 Getting started
................................................................................................................................... 552 Cross-language feature: TatScripter and TIDEScripter
................................................................................................................................... 563 Common tasks
IIContents
II
© 2002-2010 - TMS Software
.......................................................................................................................................................... 56Calling a subroutine in script
.......................................................................................................................................................... 57Returning a value from script
.......................................................................................................................................................... 57Passing parameters to script
................................................................................................................................... 584 Accessing Delphi objects
.......................................................................................................................................................... 58Registering Delphi components
.......................................................................................................................................................... 59Access to published properties
.......................................................................................................................................................... 59Class registering structure
.......................................................................................................................................................... 59Calling methods
.......................................................................................................................................................... 60More method calling examples
.......................................................................................................................................................... 61Acessing non-published properties
.......................................................................................................................................................... 61Registering indexed properties
.......................................................................................................................................................... 62Retrieving name of called method or property
.......................................................................................................................................................... 63Registering methods with default parameters
................................................................................................................................... 635 Acessing Delphi functions, variables and constants
.......................................................................................................................................................... 63Overview
.......................................................................................................................................................... 63Registering global constants
.......................................................................................................................................................... 64Acessing global variables
.......................................................................................................................................................... 65Calling regular functions and procedures
................................................................................................................................... 656 Script-based libraries
................................................................................................................................... 677 Declaring forms in script
................................................................................................................................... 688 Using the Refactor
................................................................................................................................... 699 Using libraries
.......................................................................................................................................................... 69Overview
.......................................................................................................................................................... 69Delphi-based libraries
.......................................................................................................................................................... 71The TatSystemLibrary library
.......................................................................................................................................................... 73Removing functions from the System library
.......................................................................................................................................................... 73The TatVBScriptLibrary library
................................................................................................................................... 7510 Debugging scripts
.......................................................................................................................................................... 75Overview
.......................................................................................................................................................... 75Using methods and properties for debugging
.......................................................................................................................................................... 76Using debug components
................................................................................................................................... 7611 Form-aware scripters - TatPascalFormScripter and TatBasicFormScripter
................................................................................................................................... 7612 C++ Builder issues
.......................................................................................................................................................... 76Overview
.......................................................................................................................................................... 76Registering a class method for an object
Chapter VI The syntax highlighting memo 79
................................................................................................................................... 791 Using the memo
Chapter VII TSourceExplorer component 81
................................................................................................................................... 811 Overview
................................................................................................................................... 812 Using the component
Chapter VIII C++Builder Examples 84
................................................................................................................................... 841 Integrated Development Environment
.......................................................................................................................................................... 84Using TIDEEngine component programatically
......................................................................................................................................................... 84Adding/removing units (scripts and forms) to the project
Scripter Studio ManualIII
© 2002-2010 - TMS Software
......................................................................................................................................................... 84Executing a project programatically
......................................................................................................................................................... 85Managing units and changing its properties
......................................................................................................................................................... 85Setting the active unit in the IDE
......................................................................................................................................................... 85Running and debugging a project
.......................................................................................................................................................... 85Registering components in the IDE
......................................................................................................................................................... 85Retrieving existing registered components
......................................................................................................................................................... 85Registering/Unregistering standard tabs
......................................................................................................................................................... 86Register new components
.......................................................................................................................................................... 86Storing units in a database (alternative to files)
......................................................................................................................................................... 86Replacing save/load operations
......................................................................................................................................................... 87Replacing open/save dialogs
......................................................................................................................................................... 88Checking if a file name is valid
................................................................................................................................... 892 Working with scripter
.......................................................................................................................................................... 89Getting started
.......................................................................................................................................................... 89Cross-language feature: TatScripter and TIDEScripter
.......................................................................................................................................................... 89Common tasks
......................................................................................................................................................... 89Calling a subroutine in script
......................................................................................................................................................... 89Returning a value from script
......................................................................................................................................................... 89Passing parameters to script
.......................................................................................................................................................... 90Accessing Delphi objects
......................................................................................................................................................... 90Registering Delphi components
......................................................................................................................................................... 90Calling methods
......................................................................................................................................................... 90More method calling examples
......................................................................................................................................................... 90Acessing non-published properties
......................................................................................................................................................... 90Registering indexed properties
......................................................................................................................................................... 91Retrieving name of called method or property
......................................................................................................................................................... 91Registering methods with default parameters
.......................................................................................................................................................... 92Acessing Delphi functions, variables and constants
......................................................................................................................................................... 92Registering global constants
......................................................................................................................................................... 92Acessing global variables
......................................................................................................................................................... 92Calling regular functions and procedures
.......................................................................................................................................................... 93Using libraries
......................................................................................................................................................... 93Delphi-based libraries
......................................................................................................................................................... 93Removing functions from the System library
IVContents
IV
© 2002-2010 - TMS Software
- 1
- 2
- 3
- 4
- 5
- 6
前往页