PDCHISTORY

Purpose:

Adds a command to the right click popup menu.

Syntax:

PDCHISTORY("label", "command", "tip", mode)

"label"

-

A string, the text to appear for the item in the popup menu.

"command"

-

Optional. A string, the expression to evaluate when the menu item is selected. Defaults to label.

"tip"

-

Optional. A string, the message displayed in the status line when the menu item is active.

mode

-

Optional. An integer, the command mode:

 0:

Add to command history (default)

 1:

Create a new custom right click command

-1:

Delete a custom right click command

Returns:

Nothing, The label is added to the right click popup menu.

Example:

pdchistory("Noise", "W0:=gnorm(100,1)")

 

Adds a menu item labeled "Noise" to the right click popup menu. If the item is selected, a 100 point random series is placed in the current Window.

Example:

pdchist("Noise", "W0:=gnorm(100,1)", "Random Noise")

 

Same as above except the message "Random Noise" appears in the status line when the mouse hovers over the item.

Example:

pdchist("Noise", "gnorm(100,1)", "Random Noise", 1)

 

Adds the command "Noise" to the right click menu. When selected, the current Window formula becomes "gnorm(100, 1)" and 100 samples of normally distributed noise are placed in the current Window.

Remarks:

PDCHISTORY is useful when creating your own dialog based modules to allow users to access the most recently used commands in an efficient manner.

 

Custom right click commands are created when mode is 1. Set mode to -1 to remove the last custom command.

 

PDCHISTORY can be abbreviated PDCHIST.

See Also:

MENUFILE

MENULIST

SETWFORM