Home arrow Reference arrow Prompt

CONTENT WARNING

This site refers to our older, server-based product. If you are interested in our new, Excel-based product, please see our main web site at http://www.nextanalytics.com

Prompt
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, action, name, value

Parameters:

action - [Add, Default]

name – the sequence of characters to be replaced in subsequent script commands

value – 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:

Setting a default prompt value will only set teh prompt value if it has not already been set. This is usually used when the prompt should be passed from the user interface, and no value was passed.

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).  
 

Reference

Installation - Java