# SYSTEM_HELP Invoke Windows Help

> Source: https://manual.pvxplus.com/directives/system-help

## Formats

|  |  |
| --- | --- |
| 1\. [Invoke Standard Help](https://manual.pvxplus.com/directives/system-help#Mark5)*:* | **SYSTEM_HELP** *help_path$*\[,*help_key$*\]\[,**ERR**=*stmtref*\] |
| 2\. [Invoke Application-Supplied Help](https://manual.pvxplus.com/directives/system-help#Mark7)*:* | **SYSTEM_HELP** " '*help_msg*","", *ctl_id* \[,**ERR**=*stmtref*\] |
| 3\. [Open File Based on Type](https://manual.pvxplus.com/directives/system-help#Format3)*:* | **SYSTEM_HELP { PRINT \| EDIT \| OPEN }** **\[ WAIT \]** *file_path$* \[,**ERR**=*stmtref*\] |

***Where:***

|  |  |
| --- | --- |
| *ctl_id* | Unique logical identifier for object. Numeric expression. Use integers, range -32000 to +32000. Avoid integers that conflict with keyboard definitions (e.g. using 4 can cancel CTL=4 for the **F4** key). |
| *help_key$* | Key to start within the Help file. This string expression must exactly match an entry unless the first character is:<br>\|  \|  \|<br>\| --- \| --- \|<br>\| **?** \| To denote a partial key \|<br>\| \# \| To denote that the key is the Help index \| |
| *help_path$* | Pathname of the Help file. If "\*", then the standard PxPlus EXE Help file will be used. Maximum string size 8 KB. |
| '*help_msg* | Application supplied message text, prefixed with an **'** (*apostrophe*). |
| *file_path$* | Pathname of the file that you want the system to open using its default OPEN, PRINT or EDIT logic. This is the same as opening the file from the operating system Shell/Explorer. |
| *stmtref* | Program line number or statement label to which to transfer control. |

*(The PRINT and EDIT options were added in PxPlus v6.30.)*

## Description

Use the **SYSTEM_HELP** directive to invoke standard or application-supplied Help.

Note:  
This directive only functions *in Windows or with the WindX terminal driver*.  
  
When using WindX, the Help file must be resident on, or directly accessible to, the remote workstation. If used on a text mode terminal, the system will call \*text/sys_help (or \*text/sys_print for PRINT and \*text/sys_edit for EDIT) to handle the request.

## Format 1

***Invoke Standard Help***

**SYSTEM_HELP** *help_path$*\[,*help\_key$*\]\[,**ERR**=*stmtref*\]

Use this format to invoke the standard Windows Help system and CHM-based Help files. Help files must be created in accordance with the Windows standard.

Indicate the key to start within the Help index. (Optional) If a partial key (**?**) is used, the Help subsystem tries to find the entry in the Help index that most closely matches it. If the first character is a **#** (*pound sign*), then the key is considered the Help index for the file. If it is neither **?** nor **#**, the key must be an exact match for an entry in the Help index.

***Example:***

```
1000 input "Enter customer ID:",C$
1010 if ctl=1 then system_help "OENTRY.HLP","Client"; goto 1000
```

**SYSTEM_HELP** allows you to use files other than those with a .HLP extension. PxPlus passes these directly to the Windows Shell command for processing, allowing Windows to apply normal file associations to automatically launch the appropriate application.

Preface the second argument with a **#** (*pound sign*) and append it to the first argument for URL handling.

***Example:***

```
system_help "http://www.pvxplus.com/support.htm","mymark"
```

… would be:

```
http://www.pvxplus.com/support.htm#mymark
```

Passing this to **SYSTEM_HELP** will automatically launch the default browser (if any) and jump to the Web page requested.

## Format 2

***Invoke Application-Supplied Help***

**SYSTEM_HELP** "'*help_msg*","",*ctl\_id* \[,**ERR**=*stmtref*\]

If this format is used, the text following the single quote in the Help message is displayed in a popup Help box.

***Example:***

```
system_help "'Press Me","",10
```

## Format 3

***Open File Based on Type***

**SYSTEM_HELP { OPEN | PRINT | EDIT } \[ WAIT\]** *file_path$* \[,**ERR**=*stmtref*\]

This directive can be used to request that the operating system open the file based on the file suffix.

***Example:***

If you want to print a document, you could issue:

```
system_help print "c:\docs\My Resume.doc"
```

If no option (**OPEN** / **PRINT** / **EDIT**) is specified, the system will use **OPEN** by default.

If the **WAIT** option is specified, it must be the final option and will cause PxPlus to wait until the completion of a process initiated by the **SYSTEM_HELP** command.

*(The PRINT and EDIT options were added in PxPlus v6.30.)*
