Hamilton, Archibald, active 1765-1774, Captain