954,551 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Setting a range

Hello, im interested in setting a range of pixles so that if an object is between a desired number of pixles the program responds, ive tryed

if shape1.top = 6000 to 8000 then

but to is not recognized, is there something i should be using in its place, thank you

ColdPizzaSux
Newbie Poster
1 post since Jan 2006
Reputation Points: 10
Solved Threads: 0
 

it seems to me like you will need to calculate the height of the shape. So something like

if shape1.top = 8000 and (shape1.top - shape1.height) = 6000 then
      msgbox "yup"
end if


But remember, it might be shape1.top + shape1.height, depending on how you are looking at it, because the screen starts 0,0 at the very top left and then gets bigger going down and to the right. Here is a program's source that I wrote for a friend of mine that lets him put the mouse in a given point on the screen, and while it's in that given area, it disables the screen saver

Attachments phantomspot_src.zip (60.15KB)
Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You