Interesting that polySelect(shortestEdgePath=1) doesn't, in fact, select the shortest edge path... sounds like a bug. Have you submitted it?
And, unfortunately, polySelectSp(loop=1) isn't what he's looking for either - it bases it's selection on topology. Ie, if you have an edge incoming to a vert that has 4 total edges on it, it will always select as the outgoing edge the "middle" edge relative to it, topology wise. This can result in in results that are very far from the "shortest path".
Well.. if you want to roll your own, you can always try a "greedy algorithm". You can look up that term online for more details, but the basic idea would go something like this:
You would keep a list of potential edge/vert paths, with their total distance, and sorted by their total distance. (Initially, your list of potential paths would only have a single edge path, and that edge path would only have a single vert - your start vert - and no edges.) Then, at each point in the algorithm, pop off the shortest current edge path and inspect it; if it ends with your desired end vert, you're done. Otherwise, find all other edges which connect to that path's end vert, and create a new edge path for all of these. (So, ie, if you started with an edge path of length 6 whose end vert connected to 4 other edges, then you would create 4 new edge paths of length 7.) For each of these new edge paths, update their total length, and add them into your sorted list in the correct position. Then repeat the algorithm until you find your desired vert (or run out of paths to try). The edge path you end up finding is guaranteed to be the shortest (or, at least, tied for the shortest) path between your verts.
Hope that helps...
- Paul