This is the first script I made for 3DSmax. It is just a simple script to combined the connect function for vertex and edges modes, so I can use one hotkey for the connect function.
macroScript ERConnector category:"ERConnector" toolTip:"ERC" ( if subobjectLevel == 2 do ( $.EditablePoly.ConnectEdges () --messagebox "Edge" ) if subobjectLevel == 1 do ( $.EditablePoly.ConnectVertices () --messagebox "Vert" )