masterBB
2012-05-02 03:15:08
Every time I wrote a script I used the following combination a lot:
It is exactly quit an odd piece of code. I wouldn't expect this to be needed to click with barely moving the mouse. Why do I need to declare two integers, which don't even got proper naming in this example, when I don't do anything with them?
My suggestion?
Use a TPoint instead of an x and y value for all the mouse functions. So it can look like this:
I didn't write the code because I wanted to discuss this idea here and I don't think it really adds something. Discuss!
edit:
Maybe we can do this in the lape branch with overloading. That would work so nice.
GetMousePos(x,y);
Mouse(x,y,2,2,mouse_Left);It is exactly quit an odd piece of code. I wouldn't expect this to be needed to click with barely moving the mouse. Why do I need to declare two integers, which don't even got proper naming in this example, when I don't do anything with them?
My suggestion?
Use a TPoint instead of an x and y value for all the mouse functions. So it can look like this:
Mouse(MousePos(),2,2,mouse_Left);- The code is shorter.
- It is self explanatory.
- It looks clean.
- It does exactly what is says.
- And It doesn't involve me declaring two variables called x and y.
I didn't write the code because I wanted to discuss this idea here and I don't think it really adds something. Discuss!
edit:
Maybe we can do this in the lape branch with overloading. That would work so nice.