WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Boxes Functions
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Box Coordinates

 Keywords:  box Coordinates

Question:

Is there an "easy" way (apart from trial and error) to get the coordinates/virtual coordinates correct on the box commands, e.g. boxesup, boxdrawrect etc. I have found a way of getting the box coords using mouseinfo(), but text and rect commands are really baffling me!

Answer:

You have a window. Consider it is 1000 units wide (the X axis) and 1000 units tall (the Y axis)

Now draw a box in the window.

Look at the top left corner of the box.

How far is it from the left edge of the main window? How many units? Halfway would be 500 units. 10% of the way would be 100 units.

That's the upper-x.

Now look at the top left corner again and see how far it is down from the top of the window. Again, 10% of the way down is 100. Halfway down is 500 and so on.

That is upper y.

Now repeat the process for the lower right corner of the box.

The general technique is to draw, on paper what you want. Then divide up the paper into 10 evenly spaces sections, horizontally and vertically. Kind of like graph paper.

Winbatch uses a 1000x1000 representation of the screen, and of each window inside the main one. Using the graph paper you can easily estimate where to place stuff.

500,500 is the dead center of the screen.

0,0 is the upper left. 1000,1000 is the bottom right.



Article ID:   W14829
File Created: 2001:11:30:16:20:56
Last Updated: 2001:11:30:16:20:56