Here's a strategy I found useful, "converted" into code.
I hope you find it useful too.
Note that "un" doesn't mean single unit. It can also be a group (group as in "list" of units);
Here's the code:
for x=1 to enemylist do