Robert McColl, of Wentworth Road, was admonished after pleading guilty to assaulting a care assistant.
He admitted striking Susan Gorrie on the body at an address on the same street on May 16 last year.
The court heard that McColl, who has a learning disability, swung his hand and struck Ms Gorrie on the arm and stomach without warning as she was carrying out her duties.
The 58-year-old told her: “You will only leave when I tell you.”
Ms Gorrie later reported the matter at Longhaugh police office and McColl made no response to being cautioned and charged.
Before admonishing McColl, Sheriff George Way said: “I am going to take the view that marking this with a conviction is sufficient for someone who would have difficulty in understanding what was going on.”