Steady shot/Auto shot rotation macro - check out the Elitist Jerks link I posted above for an expanation of shot rotation.
#showtooltip Steady Shot
/castsequence reset=3 Steady Shot, !Auto Shot
/castrandom [target=pettarget, exists] Kill Command
/script UIErrorsFrame:Clear()
You can take out the Kill Command line if you don't use Kill Command. Some people add in Arcane Shot to the macro - but you need to add in extra Steady/Auto rotations as follows:
#showtooltip Steady Shot
/castsequence reset=3 Steady Shot, !Auto Shot, Steady Shot, Arcane Shot, !Auto Shot, Steady Shot, !Auto Shot
/castrandom [target=pettarget, exists] Kill Command
/script UIErrorsFrame:Clear()
Unfortunately, there are times when Arcane Shot can be bad to use (like when fighting Krosh Firehand in Gruul's lair, for Beastmaster rotations, or when using a fast ranged weapon), so it may be better to manually time it, which is what I like to do. Also, you would need a slow weapon with a speed of 3.0 or higher to pull off timing an Arcane Shot between a Steady and an Auto Shot.
For a good explanation of how the macro works, see the guide "Steady Shot Macros, your questions answered by Strain of Blackhand" at http://tkasomething.com/steady.php