-
Notifications
You must be signed in to change notification settings - Fork 0
pts script syntax requires
prompt_data is the text to be presented to the user for each variable required. It must be enclosed in quotes, unlike TEXT and FIELD data. If it is not, the variable line will be ignored.
variable_data is the name that this piece of data will be known by in the script from now onwards. It should be a single word, and must begin with and contain exactly one dollar sign ($). If it does not fit that pattern, it will be ignored. Although the line will not be ignored if more text follows a legitimate variable name, that extra text is ignored and is not part of the variable name. The dollar sign, however, is part of the name and must be used for it to work. See the section Literal Text, Variables & Quotes for details of usage.
REQUIRES commands can appear anywhere in the script, but logically they must appear before you try to use the variable somewhere else, otherwise they will show ???. It would be considered good practice, though, to declare them at the top of the script, or at least before each section that uses them.
There are some reserved variable names:
- AwaySpeaker
- Congregation
- LastWeek
- LastMonth
- LastYear
- LocalCong
- LocalSpeaker
- LocalAndAwaySpeaker
- Today
- NextWeek
- NextMonth
- NextSixMonths
- NextTwoYears
- NextYear
- NextQuarter
- NumTabStops
- RangeStart
- RangeEnd
You can specify a set of options to associate with the variable. These values should be comma separated, and the list of values should be enclosed in speech marks. These values will be displayed in the editor in the drop-down list. You can still override those choices manually if so desired. Note, if you specify only one optional value, then it will be treated as a default value (see below) rather than an option for a drop list.
The custom script editor will raise multiple errors whenever uninitialised variables have been used for LOOP and IF criteria. Consider using default variable values to avoid this issue. The first option specified for the VALUES parameter will become the default. The editor will use ??? when nothing has been specified for the VALUES parameter.
Examples:
REQUIRES "Away Speaker:" AS $AwaySpeaker
REQUIRES "Show talk numbers?" AS $bShowTalkNos VALUES "Yes,No"
Copyright © 2002 - 2025 by Andrew Truckle. All Rights Reserved.
- Using Public Talks
- Main Application Menu
-
Database Ribbon Panel
- Assignments Editor
- Backup Database
- Check Talk Exchange
- Compact Database
- Convert Database
- Create Unassigned Date Entries
- Database Security
- Maintain Databases
- Purge Database
- Rearrange Dates
- Restore Database
- Help Ribbon Panel
-
Home Ribbon Panel
- Create a Report
-
Manage Custom Reports
- Editing Scripts
- Content Ribbon Panel
- System Ribbon Panel
- Script Command Syntax
-
Tutorials
- Using The Script Editor
-
How To Write Scripts
- Module 1 - The Basics
- Module 2 - Hello, World!
- Module 3 - Multiple Text Blocks
- Module 4 - It's A Date, Then
- Module 5 - Oh, I'm Blushing!
- Module 6 - It is a Rainbow!
- Module 7 - The Font Of All Knowledge
- Module 8 - Queue To The Right
- Module 9 - Memory Like An Elephant
- Module 10 - May I Squeeze In There?
- Module 11 - Move Over, Please
- Module 12 - You Move Over Here
- Module 13 - Is My Back A Funny Colour?
- Module 14 - I'm Going Loopy Here!
- Module 15 - Fields Of Golden... Text
- Module 16 - Man, That Looks Weird
- Module 17 - Inner Peace, Inner Loop
- Advanced Script Features
- Quick Access Toolbar
- Settings Ribbon Panel
- Tools Ribbon Panel
- Revision History
- Contact Information