The syntax in the headline doesn't make sense.
I'm not sure if you want to look what's in an area(1) or if you want to check if a specific thing is in an area(2). (Do you know what "something" is or are you trying to find out?)
1)
Since you are testing multiple coordinates, there can obviously be multiple hotspots, objects and characters.
You'd need to specify whether you want the e.g. first hotspot, going from x,y1 to x,y2 or the character with the lowest ID, or the object with the greatest y coordinate. In theory you could put all found objects in an array and process that further.
2)
Alternatively, if you actually want to ask how to determine if a specific object currently is within certain coordinates, all you need to do is determine a center point and calculate its distance from the line x,y1 to x,y2.
Please try to explain better what you want to do. Try explaining it as a designer who doesn't know a hotspot from a variable.