Skip to main content

OpenHelp

OpenHelp [flags] fileNameStr

The OpenHelp operation opens the specified help file.

The OpenHelp operation was added in Igor Pro 7.00.

Parameters

The help file to be opened is specified by fileNameStr and /P=pathName where pathName is the name of an Igor symbolic path. fileNameStr can be a full path to the file, in which case /P is not needed, a partial path relative to the folder associated with pathName, or the name of a file in the folder associated with pathName. If OpenHelp cannot determine the location of the file from fileNameStr and pathName, it returns an error.

If you use a full or partial path for fileNameStr, see Path Separators for details on forming the path.

Flags

/INT[=interactive]Controls whether opening the help file is interactive or not.
/INT=0:If the help file being opened needs to be compiled, OpenHelp compiles it without presenting a dialog. Compilation errors are not presented to the user but are reflected in the V_Flag output variable.
/INT=1:If the help file being opened needs to be compiled, OpenHelp presents a dialog asking the user whether the file should be compiled. During the compile, a progress dialog is displayed. Any errors are presented to the user in an error dialog. This is the default behavior if /INT is omitted.
/P=pathNameSpecifies the folder to look in for the file. pathName is the name of an existing Igor symbolic path.
/PICTScans the compiled help file for pictures and stores information about all pictures in a semicolon separated list into the S_pictureInfo output string. If the help file needs to be compiled but compilation fails, S_pictureInfo is set to "".
/V=visibleControls help window visibility.
visible = 0:The help window will be initially hidden.
visible = 1:The help window will be initially visible. This is the default if /V is omitted.
/W=(left,top,right,bottom)
Specifies window size and position. Coordinates are in points.
/Z[=z]Controls error reporting.
/Z=0:Report errors normally. /Z=0 is the same as omitting /Z altogether. This is the default behavior if /Z is omitted.
/Z=1:Suppresses normal error reporting.
/Z alone has the same effect as /Z=1.
/Z=1 prevents aborting procedure execution if an error occurs, for example if the file does not exist or if there is a compilation error. Use /Z=1 if you want to handle errors in your procedures rather than having execution abort.
When using /Z or /Z=1, check V_Flag to see if an error occurred.

Details

If you use /P=pathName, note that it is the name of an Igor symbolic path, created via NewPath. It is not a file system path like "hd:Folder1:" or "C:\\Folder1\\". See Symbolic Paths for details.

If the specified file is already open but not as a help window (for example as a notebook), OpenHelp returns an error.

If the /W or /V flag is used, or both, the window size and position and visibility are set as specified even if the file itself is already open, so long as the file is already opened as a help window.

Output Variables

The OpenHelp operation returns information in the following variables:

V_FlagSet to a non-zero value if an error occurred and to zero if no error occurred.
V_alreadyOpenSet to 1 if the specified help file was already open as a help file or to zero otherwise.
S_pictureInfoIf you include the /PICT flag, OpenHelp sets S_pictureInfo to a semicolon-separated list of information for all pictures in the help file. If the help file needs to be compiled but compilation fails, S_pictureInfo is set to "".

See Also

CloseHelp