What is the origin of 'hitting on someone'?

Today I heard my friend talk about last night, at a party, how he was hitting on this one girl over by the bar. In my own hung over head, I was thinking, ‘did he say he just socked a girl over by the bar?’

Of course this means complimenting another, usually with a sexual motive. But where did this odd phrase originate?

In its regular usage, to “hit on” something meant to find it by chance.

It would be common for someone to casually remark along the lines of “I hit on a top root at the Goat & Compass last night.”

It’s drifted only slightly from there.

To “pay unsolicited and usually unwanted sexual attention to” (dictionary definition) or to “approach or engage with the hope of picking up” (how I would put it) is a long way from “find by chance.” Drifted? Heck, it’s not even in the same body of water.

yeah, i don’t think that one is too likely of a posibility.

The idea being that people would commonly say “I hit on a pretty girl down at the pub,” with “hit on” meaning “To meet or reach what was aimed at or desired; to succeed, – often with implied chance, or luck.”

Through regular use, the phrase (in that context) drifted from referring to the finding of the desired person, to the action that usually accompanies finding the person. This is a common idiomatic drift – people use words or cliches until they separate from their original meaning and develop their own meaning through usage. Look at “dude,” which has drifted from being a (mostly derisive) word for a man who is overly-concerned with having fine clothes. In its recent usage, it has absolutely no attachment to clothes – but by virtue of the people it was applied to, it’s come to be associated with other shared traits of idle youth, and lost its overtone of censure. It’s drifted. You can’t say that there must be a different etymology for “dude,” because these days it’s usually applied to people who dress like bums and don’t care.

As for “hit on”, it seems like a rather obvious evolution of an preexisting phrase to me, but I’d be interested to hear any other ideas as to how a phrase in common usage might independently spring up with this specific connotation.