the first macro will work:

/assist focus
/cast [harm] shoot;

but the second is hit or miss. the issue is that auto-shoot only works if you have a target. using the second macro:

/cast [target=focustarget,harm] shoot;

you are not setting the target, just using it. you need to insure your target is set, and the picture to the right of yours is set properly.

/target focustarget
/cast shoot

this is what i normally use. (adding the [harm] i've never done, but would be an advisable addition)