A newer version of Max is available. Click here to access the latest version of this document.

onecopy

Prevent multiple copies of the same patcher from being opened

Description

Use the onecopy object inside a patcher that you want to place in the extras folder for inclusion in the Extras menu. When the patcher's name is chosen using the Extras menu, its window will be brought to the front instead of opened a second time if it has already been loaded. The patch will be loaded if it is not currently open. The onecopy object cooperates with the Extras menu to ensure that only one copy of the patcher is opened at a time. However, opening the patcher containing a onecopy object by choosing Open... from the File menu will open additional copies.

Arguments

None.

Information for box attributes common to all objects

Output

(Behavioral): onecopy includes the patcher, within which it resides, in the Extras menu and ensures that only one copy of the patcher is opened at a time.

Examples

Use onecopy to prevent multiple copies of the same patch from being opened from the Extras menu

See Also

Name Description
thispatcher Send messages to a patcher
pcontrol Open and close subwindows within a patcher