Certain place to attach mesh

Is it possible to make a script attach mesh #1 to mesh #2 at a certain area on the second mesh depending on where you put the first one on the screen? sorry if that doesnt make sense

Sounds like you could do that by vertex parenting one mesh to another via a script.