Home
Prompt, Add
This function sets up a string-substitution action for subsequent script commands. It is commonly used to to pass parameters to other scripts and projects. See the Caution below.

Syntax:

Prompt, Add, name, value

Parameters:

name – the sequence of characters to be replaced in subsequent script commandsvalue – the new value to be used

Examples:

Prompt,add,[PageTitle],New Page Title

PageCaption,[PageTitle]

This example creates a new prompt of the name “[PageTitle]”.  The value associated with this will be “New Page Title”.  After this script function has been issued, all subsequent script commands will perform text substitution: If they see the string “[PageTitle]” they will replace it with “New Page Title”.

Comments:

Prompts are case sensitive, so ‘[PageTitle]’ is different from ‘[pagetitle]’.

CAUTION: We strongly recommend the convention of enclosing the prompt name in square brackets or similar special character to avoid unintentional string-substitution. The string substitution action does not differentiate command text from command parameters, so it is possible to dramatically change script functionality (e.g. prompt,add,pagecaption,removepage would change all pagecaption commands into removepage commands).  
 
< Prev   Next >

Reference