Pressing F8 will target the closest NPC that is in front of you. It will lock onto the closest sign, shop keeper, wyvern, enemy, and even mining point that you are facing.
You can try this little macro that someone suggested in another post:
/target <bt>
The <bt> tag is battle target, whatever your party is fighting. I have not tried this myself, but supposedly it works well. (I am not sure how it pick an enemy if your party is fighting more than one at once for example.)
Another macro idea that I have come up with, but have never tried is this little ditty...
/assist <stpc>
This should call up a sub target allowing you to use the function key to pick a party member to assist. If it works correctly, it will target what he/she is fighting. I have not had the chance to test this out yet, so I will not guarantee its success.
Just a few helpful suggestions.