miketh2005 Posted April 25, 2012 Posted April 25, 2012 So I am using MouseGetPos, and I want a function to start if the mouse is inside a square area on the screen. I want to do something like this: $var = MouseGetPos() If $var[0] [is between 69 - 84] and $var[1] [is between 38 - 57] Then Func() I know this isn't correct, so how would I script this? If this script was correct, then it would work, right? It would start the function when the mouse is between those coordinates, effectively a square, right? Thanks. Btw, I see that And is a function, yet I can find nothing about it in the help file? Thanks.
Realm Posted April 25, 2012 Posted April 25, 2012 (edited) Hello miketh2005, Maybe this will help: $var = MouseGetPos() If $var[0] >= 69 And $var[0] <= 84 And $var[1] >= 38 And $var[2] <= 57 Then Func() The operator 'And' is covered in the helpfile along with many of the other 'Operators'. Realm Edited April 25, 2012 by Realm My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry.
miketh2005 Posted April 25, 2012 Author Posted April 25, 2012 Hello miketh2005, Maybe this will help: $var = MouseGetPos() If $var[0] >= 69 And $var[0] <= 84 And $var[1] >= 38 And $var[2] <= 57 Then Func() And is covered in the helpfile along with many of the other 'Operators'. Realm Thanks so much. That is a simple way to do it!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now