Jump to content
Sign in to follow this  
jaweb

Random MouseClick within specific application, how?

Recommended Posts

jaweb

I've manage to write an entire script simply by searching but I now need specific answers.

I have

MouseClick("left",Random(0,@DesktopWidth,1),Random(0,@DesktopHeight,1))

but I want it to randomly click within a certain area of the screen (an inch within the screen borders), or preferably, only within a application. Thanx

Share this post


Link to post
Share on other sites
StandardUser

You can get the aplications window position with WinGetPos() and set Random() min max values within that interval.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.