The Spectator has an Eye Ray option, Confusion Ray, that says:
[The target] uses its action to make a melee or ranged attack against a randomly determined creature within range.
Unlike the spell Confusion which limits the attack to melee attacks, the Spectator's victim can be compelled to make a ranged attack.
When determining the random target, are creatures that are outside of the weapon's normal range but within the weapon's long range included?
For a specific example, say a Rogue with a light crossbow is hit by the ray and fails their save. On their turn, there are three allies within 80 feet, and the Spectator is 90 feet away. Is there a chance that the Rogue randomly targets the Spectator?