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

onecopy Reference

Prevent multiple copies of the same patcher from being opened

onecopy

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.

Examples

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

Arguments

None.

Attributes

Common Box Attributes

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.

See Also

Name Description
Sharing Max Patchers Sharing Max Patchers
thispatcher
pcontrol