After gaining a promising first innings lead of 112 by bowling out Lancashire for 196 - at one point the visitors were wobbling at 92-7 - they increased that advantage to 189 by the close of play on day two when they stood on 77-3.
Earlier, Steve Patterson was last out for 45 as Yorkshire’s first innings lasted a further 11 balls after they resumed on 301-9.
Patterson, 41 overnight, struck Neil Wagner to the cover boundary before slashing the pace bowler to Tom Smith in the gully, Wagner finishing with 4-75.
Patterson faced 70 balls and hit seven fours and a six, his innings continuing his excellent batting form of this summer.
He then returned to doing what he has done so well for so long for Yorkshire, edging closer towards a significant milestsone with the ball before lunch by taking one of the two wickets he needs to reach 300 in first-class cricket.
He landed the first blow in the visitors’ first innings when he had Tom Smith caught at backward-point by Gary Ballance for 26 with the total on 46.
With a little more luck he might have added to it as Lancashire reached lunch on 68-3 from 27 overs, with Alviro Petersen on eight and Steven Croft on three.
Tim Bresnan claimed the second wicket when Haseeb Hamee was caught at second slip by Adam Lyth for 17 with the score on 56 in the 18th over.
And Jack Brooks struck with the first ball of his second spell to have Luke Procter lbw for six as the visitors slipped to 59-3 in the 22nd over.
The hosts then turned the screw when they took seven wickets in the afternoon session.
Brooks struck with the fifth ball after lunch when he trapped Petersen lbw for eight as he tried to turn the ball to leg.
Lancashire fell to 69-5 when Karl Brown was caught behind for a duck as he tried to withdraw his bat to a ball from Patterson, giving the pace bowler that 300th wicket.
Brooks and Patterson were outstanding and the epitome of accuracy, with their first 22 overs between them costing just 29 runs.
Bresnan claimed his second wicket of the innings when he had Croft caught at third slip by Jack Leaning for 14 as the visitors fell to 91-6.
That became 92-7 in the next over when Liam Plunkett’s pace was too much for Tom Bailey, who was caught behind down the leg side as he tried to fend off a short delivery.
Lancashire slipped to 126-8 when Adil Rashid trapped Neil Wagner lbw for 12 with his first ball of the innings, but Liam Livingstone and Kyle Jarvis clouted Lancashire past the follow-on target of 159.
Rashid finally had Jarvis stumped for 33 from 28 balls with seven fours and then rounded off the innings by having Simon Kerrigan lbw for six.
Livingstone fought hard to score an undefeated 60, made from 83 balls with seven fours and a six.
Rashid finished with 3-37 from 5.4 overs, while there were two wickets apiece for Bresnan, Brooks and Patterson, plus one for Plunkett.
Yorkshire: Lyth, Lees, Ballance, Gale (capt), Leaning, Rashid, Bresnan, Hodd, Plunkett, Patterson, Brooks,
Lancashire: Smith, Hameed, Procter, Petersen, Croft (capt), Brown, Livingstone, Bailey, Wagner, Jarvis, Kerrigan.