Jump to content

Recommended Posts

Posted

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.

Posted (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 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. 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...