HOUSTON (AP) -- Hunter Pence spent most of the All-Star break facing a pitching machine in the batting cage at Minute Maid Park. The extra work produced instant results.
The All-Star break came at an inconvenient time for Pence, who hit .281 (9-for-32) in the seven games leading up to it. Instead of relaxing at home, Pence made almost daily trips to the empty ballpark to work on his hitting.
"Basically, I just worked my eye," he said. "I didn't want to swing a whole bunch and tire myself out. I just bunted a whole bunch of sliders and tried to work my eye and get the rhythm because I haven't been hitting them very well.
"I feel a lot better. It definitely gave me some confidence."
The 36-year-old Moehler took the opposite approach to the break from Pence. Rather than focus on baseball, Moehler retreated to a lake house in South Carolina with his family.
"It's like anyone else who works 9-to-5 and goes on vacation. You don't take your work on vacation with you," Moehler said. "I relaxed with my family and just got away from the game."
Miguel Tejada, who played in the All-Star game, led off the Houston ninth with a one-hop, ground-rule double into the seats in right. Pence lined the first pitch he saw from Howry (3-3) to the gap in left center.
Tejada hesitated, then sprinted home, beating the throw from center fielder Jim Edmonds. Pence jumped in the air and pumped his fist at second as the rest of the Astros mobbed Tejada at the plate.
"I was trying to hit a ball up the middle and give myself a chance to, at worst, get him over," Pence said. "For me, the best approach was to try to drive the ball up the middle."
Geoff Geary (2-1) pitched two perfect innings in relief for the win.
Moehler allowed four hits and struck out three in matching his longest start of the season. Edmonds' homer in the fifth was the only blemish on Moehler's performance.
Cubs starter Ted Lilly was just as good, giving up six hits with six strikeouts in seven innings.
"Lilly pitched well enough to win," Cubs manager Lou Piniella said, "but so did their guy."
Both pitchers breezed through the first four innings, allowing two hits apiece. Ryan Theriot had a two-out double in the third for the Cubs and Kaz Matsui legged out his first triple of the season with two outs in the Astros' half of the inning.
Edmonds led off the fifth with his 11th homer, an opposite-field shot into the porch in left. Mark DeRosa flied out to the warning track in right before Mike Fontenot hammered a double off the left-field scoreboard.
Fontenot went to third on Moehler's wild pitch to Lilly, but Lilly struck out on the next pitch. Theriot walked, but Kosuke Fukudome flied out to stall the threat.
The Cubs finished the first half of the season with a 4-2 loss to Tim Lincecum and San Francisco. Piniella said the Cubs' bats seemed even more sluggish on Friday.
"We scored two prior to the break and one tonight," Piniella said. "I don't know if that's too much rest or too little."
Moehler retired seven straight Cubs after the walk to Theriot.
Lee led off the Astros' seventh with a towering homer over the railroad tracks in left, his 22nd of the season. Lee has 10 homers and 30 RBIs since June 8.
Lilly has given up 22 homers this season, the most by any Cubs pitcher. Ryan Dempster is second with 11.
"I had the feeling it was going to be a game where we had to limit our mistakes," Lilly said. "Unfortunately, I made one late to a pretty good hitter."
Tejada and Pence followed Lee's home runs with singles and catcher Geovany Soto trotted out to the mound for a quick chat with Lilly.
Lilly then struck out Ty Wigginton and got Mark Loretta on a fly out to center. Geoff Blum pinch-hit for Moehler and walked to load the bases for Matsui, the leadoff hitter, who grounded into a fielder's choice to end the inning.
Geary has thrown 12 scoreless innings in July. ... Theriot has an 11-game hitting streak. ... Astros C Humberto Quintero will begin a rehab assignment with Double-A Corpus Christi on Saturday. Quintero has been on the DL since July 2, a day after he suffered a concussion in a game against the Los Angeles Dodgers. Quintero was struck in the helmet by Luis Maza's bat as he finished a swing.