
688
ADOBE FRAMEMAKER SCRIPTING GUIDE
Function Summary
Last updated 9/26/2011
PromptMetric()
does not assign a value to
*metricp
if the user clicks Cancel.
PromptMetric()
dialog boxes behave like metric dialog boxes in the user interface.If the user types a number followed
by a string that represents a unit (for example 10pts or 5"), the method converts the number into the equivalent
number of metric units. If the user does not specify a unit, the method uses points (metric 65536).
The method returns 0 if the user clicked OK; a nonzero value if the user clicked Cancel or an error occurred.
On failure, the method assigns the following value to
FA_errno
:
Returns
int
Syntax
PromptMetric(message, stuffVal, defaultunit)
Parameters
PromptString
Description
Displays a dialog box that prompts the user for a single string value. It allows you to provide a default string, which
appears in the entry field when the dialog box appears. The dialog box has OK and Cancel buttons.
Note:
Do not call
PromptString()
to prompt the user for a pathname. If the user enters a pathname as a string, the
backslash character (
\
) is interpreted as a special escape character. For example, the characters
\s
represent a space. If
the user enters the pathname
c:\sample
, this string is interpreted as
c: ample
. To prompt the user for a pathname, use
“
ChooseFile
” on page
686 to display a file selection dialog box.
The method returns 0 if the user clicked OK; a nonzero value if the user clicked Cancel or an error occurred.
On failure, the method assigns the following value to
FA_errno
:
Returns
string
Error
Reason
Constants.FE_Transport (-1)
A transport error occurred.
Parameter name
Data Type
Optional
Description
message
string
No
The message that appears in the dialog box. It must be 255
characters or less.
stuffVal
string
No
The default value that appears in the input field when the dialog
box is first displayed.
defaultunit
int
No
The metric unit to use if the user does not specify one.
Error
Reason
Constants.FE_Transport (-1)
A transport error occurred.