Jump to content
Macro Express Forums

Randomize Location Click


Recommended Posts

Hi,

as the title says I wish to Randomize Location Click on a specific area.

I have the idea of using variable like N1 and so on, but I dont fully understand how to insert a location X & Y limit and then randomize the click with the range.

Im quite a newbie, so please forgive me if I dont get your answer straight away!

Thanks to all.

Link to comment
Share on other sites

Using the width and height of the current window...

 

Variable Set Integer %WindowWidth%: Set to the Current Window's Width
Variable Set Integer %WindowHeight%: Set to the Current Window's Height

Variable Set Integer %x% to a random value between 0 and %WindowWidth%
Variable Set Integer %y% to a random value between 0 and %WindowHeight%

Mouse Move: %x%, %y% Relative to Current Window
Mouse Left Click

 

Practically speaking, there may be "boundary issues" when the values of x and y are very small or large. For example, because most (all?) windows have borders that are a certain number of pixels wide, clicking the border may have unanticipated effects.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...