Oddly enough I think I know this one, however I am at work right now so I will post it a bit later.
Ok here is the one I use (I am a medic and have heals in slot00 and 01 which you may want to remove)
Macro name = peta
/tar self;
/pause 1;
/ui action cycleTargetOutward;
/pause 2;
/ui action petToolbarSlot0;
/pause 1;
/ui action toolbarSlot00;
/pause 1;
/ui action toolbarSlot01;
/macro peta;
Just chop and change it to suit your needs.
Edited, Feb 20th 2009 1:04am by MontyB