Ayaan Ali also tried to attack another man while allegedly brandishing a large carving knife in the incident in Barnsley town centre on September 8 last year.
A jury at Sheffield Crown Court heard on Thursday how the 29-year-old, an inpatient with paranoid schizophrenia, is alleged to have bought a pack of knives from a Quality Save store before running round nearby market stalls shouting "kill, kill, kill".
The court heard Ali "set her sights" on Mr Froggatt, who was walking through the town centre intending to get a key cut, and chased him for about 100 metres. Mr Froggatt told the court he later found he had suffered a small puncture wound to his left shoulder.
Ali, from Isleworth, London, denies charges of attempted murder, possession of an offensive weapon and affray. She appeared in court via videolink.
In a video interview played to the jury, Mr Froggatt described seeing a woman in Islamic clothing and a headscarf before feeling an impact on his shoulder.
He said he turned and saw the same woman with a large carving knife, which he thought was about 12in (30cm) long.
Mr Froggatt said: "She was brandishing the knife and going, 'Kill, kill, kill.
"That's all she said: 'Kill, kill, kill'."
He told interviewing detectives she moved towards him and "all the time she was looking at me - 'kill, kill, kill - kill, kill, kill'".
Prosecutor Kate Batty told the jury of four women and eight men how, after Ali stopped chasing Mr Froggatt, she appeared by the market stalls again, where she turned her attention to window cleaner Mark Watson.
The prosecutor said Ali told Mr Watson: "You're a male prostitute, I'm going to kill you."
At this point Ali "tried unsuccessfully to stab him" but Mr Watson managed to avoid injury by entangling her in a market stall tarpaulin and using his window bucket to defend himself, the court was told.
Ms Batty read a statement from bank worker Kaye Asquith, who described frantically trying to shut the automatic doors when she saw Ali coming towards her brandishing a knife as she opened her branch.
Ms Asquith said she was "absolutely terrified" and added: "She was attacking people at random."
The witness said: "When she was running around Peel Square, I could hear her shouting 'kill, kill, kill' and also muttering in a foreign language."
The prosecutor said market inspectors confirmed Ali was asking where to buy knives within moments of arriving in the town centre at around 8am on Saturday September 8 last year, and was seen soon after grappling with plastic packaging over a bin.
She was later arrested at the transport interchange around 30 minutes after she arrived in the town centre.
Judge Peter Kelson QC told the jury there was no dispute that it was Ali with the knife in the square.
He said the issue for them to decide was "about the defence of insanity".
Ms Batty said the question for the jury was whether Ali knew what she was doing and also whether she knew what she was doing was wrong.
The trial is expected to last until early next week.