Make sure the "Ships should clear orders when enemy presence enters system" option is checked. (Empire Options screen) Any time it encounters an enemy ship, it will clear orders, allowing you to enter new ones to attack the enemy.
Now, I agree it would be nice to have a "Patrol, but deviate from course to attack enemies up to X sectors away, provided they are below Y% of our strength" order system. SE5?

__________________
The Unpronounceable Krsqk
"Well, sir, at the moment my left processor doesn't know what my right is doing." -
Freefall