An application to the court for an order, if not presented in some other pleading, shall be by motion which, unless made during trial or hearing or in open court, shall be in writing.