
685
ADOBE FRAMEMAKER SCRIPTING GUIDE
Function Summary
Last updated 9/26/2011
To determine if a particular FS_OpenStatus bit is set, use “
CheckStatus
” on page 651.
Returns
Object
Syntax
Open(fileName, openParams, openReturnParams)
Parameters
ScrollBox
Description
Displays an array of items and allows the user to choose one.
Note:
If you set
default
to -1, always check to make sure the value returned in
selected_item
is 0 or greater before
you use it as an array index. If you set
default
to -1 and the user clicks OK without choosing an item, the value returned
in
selected_item
will be -1.
Returns 0 if the user clicked OK, or a nonzero value if the user clicked Cancel or an error occurred.
On failure, the method assigns the following value to
FA_errno
:
•
Constants.FE_Success (0)
•
Constants.FE_Canceled (-44)
•
Constants.FE_FailedState (-45)
•
Constants.FE_CanceledByClient (-86)
•
Constants.FV_LockWasReset (0) - File lock was reset.
•
Constants.FV_LockNotReset (1) - File had a lock that was not reset.
•
Constants.FV_LockCouldntBeReset (2) - File had a lock that could not be reset.
•
Constants.FV_FileWasInUse (3) - File was in use.
•
Constants.FV_FileIsViewOnly (4) - File is a View Only file.
•
Constants.FV_LockWasInvalid (5) - File had an invalid lock.
•
Constants.FV_FileIsNotWritable (6) - The file was not writable, and the user canceled the
open through the alert.
•
Constants.FV_FileModDateChanged (7) - The file has changed since the last time it was
opened or saved in the current session.
Parameter name
Data Type
Optional
Description
fileName
string
No
The full pathname of the file to open. If you are using
Open()
to
create a document, specify the name of the template to use.
openParams
PropVals
No
A property list telling the FrameMaker product how to open the
file and how to respond to errors and other conditions. To use
the default list, specify NULL.
openReturnParams
PropVals
No
A property list that returns the filename and provides
information about how FrameMaker opened the file. It must be
initialized before you call
Open()
.
FS_OpenNativeError and FA_errno values
Possible FS_OpenStatus flags