I don't see why it needs to be a JA. Auto attack when out of range and facing the mob, you fire ranged. Auto-attack when in melee range, you melee. If you want to ranged in melee range, use it manually. If you're out of melee range and want to stop firing ammo, turn.