/petattack [nocombat]
/cast [nocombat] Hunter's Mark
/cast [combat] Serpent Sting
Sends pet into combat with selected target. If your not in combat adds hunters mark if you are shoots Serpent Sting.
Can keep hitting that button while in combat to renew serpent sting.
Not the best or most indepth macro out there I guess but this is what I have used for the longest time on my hunter and still use it a ton to this day.