Harry
02-26-2008, 11:03 PM
~ How to use MouseBox ~
Hi, and thanks for visiting my first real tut :)
I today will teach you how to use the very useful MouseBox procedure.
First off, here is how to write it:
MouseBox(x1,y1,x2,y2, ClickType(1 = True click, 2 = False click, 3 = No click, integer);
The x1 and y1 varables can be gotten by clicking the color picking button, then clicking in the top left corner of an object. MAKE SURE THE COORDS YOU PICK ARE ACCURATE OR BAD THINGS CAN HAPPEN!
After you do that, look at the SCAR debug. It will say something like this:
Color Picked: 8388608 at (500, 262)
The numbers in the parenthesis [()] are the x1, and y1 coordinates. Plug them in in the MouseBox procedure in the x1 and y1 slot!
Repeat the above, only color pick the bottom right of the object. Then put them into the x2 and y2 variable slots. You now have your 'box' made!
Now you are almost ready to go!... One last thing though before you speed off ;):
Choose your ClickType.
If you want it to left click on the section, replace ClickType with 1.
If you want a right click, replace with a 2.
If you just want it to move the mouse to the box, then set to 3.
Note about click types:
- Left Mouse Button - The one you click on stuff a lot with, the one on the left hand side of the mouse :p On RuneScape it makes a red or white X on an object.
- Right Mouse Button - The one you click with for options to pop up, right hand side of the mouse. On RuneScape it makes an options menu pop up.
Why use MouseBox?
It is easier to set the parameters of the clicking then just Mouse(x,y,randx,randy,Click); because you set in the areas where you want.
MOUSEBOX SHOULD NOT REPLACE MOUSE(...);! It is just best used for when you are clicking on a small section on the screen that is constant (Like the Special Attack Button)
Do not try to make a script with pure MouseBoxes please. :)
Enjoy, thanks for reading my tut, good luck scripting! :)
~ Harry
Hi, and thanks for visiting my first real tut :)
I today will teach you how to use the very useful MouseBox procedure.
First off, here is how to write it:
MouseBox(x1,y1,x2,y2, ClickType(1 = True click, 2 = False click, 3 = No click, integer);
The x1 and y1 varables can be gotten by clicking the color picking button, then clicking in the top left corner of an object. MAKE SURE THE COORDS YOU PICK ARE ACCURATE OR BAD THINGS CAN HAPPEN!
After you do that, look at the SCAR debug. It will say something like this:
Color Picked: 8388608 at (500, 262)
The numbers in the parenthesis [()] are the x1, and y1 coordinates. Plug them in in the MouseBox procedure in the x1 and y1 slot!
Repeat the above, only color pick the bottom right of the object. Then put them into the x2 and y2 variable slots. You now have your 'box' made!
Now you are almost ready to go!... One last thing though before you speed off ;):
Choose your ClickType.
If you want it to left click on the section, replace ClickType with 1.
If you want a right click, replace with a 2.
If you just want it to move the mouse to the box, then set to 3.
Note about click types:
- Left Mouse Button - The one you click on stuff a lot with, the one on the left hand side of the mouse :p On RuneScape it makes a red or white X on an object.
- Right Mouse Button - The one you click with for options to pop up, right hand side of the mouse. On RuneScape it makes an options menu pop up.
Why use MouseBox?
It is easier to set the parameters of the clicking then just Mouse(x,y,randx,randy,Click); because you set in the areas where you want.
MOUSEBOX SHOULD NOT REPLACE MOUSE(...);! It is just best used for when you are clicking on a small section on the screen that is constant (Like the Special Attack Button)
Do not try to make a script with pure MouseBoxes please. :)
Enjoy, thanks for reading my tut, good luck scripting! :)
~ Harry