How to delete default MIDI ports in a Max application?

Peter Ostry's icon

I save my patch as application and want only the MIDI port which I created myself. This does not work, I get additionaly the 4 automatically created ports named by the application itself. For example: "from App 1", "from App 2", "to App 1", "to App 2". And I get my own port "MyPort".

It works as long as I am in Max, I can delete the automatic ports "from Max/MSP 1" ... at startup. But when I save as application, the automatic ports are here again — Yes, I use their correct names in the deletion-scripts. I delete via message boxes triggered by [loadbang].

Is there a setting to tell the application not to create ports on it's own?

(Max 5)

Peter Ostry's icon

Solved.
Sorry, my mistake.

I was wrong, did not use the correct port names for deletion.