Electromagnetically-operated mechanisms