Lucatan Posted May 13, 2012 Report Share Posted May 13, 2012 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. Quote Link to comment Share on other sites More sharing options...
acantor Posted May 13, 2012 Report Share Posted May 13, 2012 Variable Set Integer %x% to a random value between 0 and 500 Variable Set Integer %y% to a random value between 0 and 500 Mouse Move: %x%, %y% Relative to Current Window Mouse Left Click Quote Link to comment Share on other sites More sharing options...
Lucatan Posted May 14, 2012 Author Report Share Posted May 14, 2012 That's perfect! Thanks a million! Now i just need to change "0"& "500" to match my needs. Quote Link to comment Share on other sites More sharing options...
Cory Posted May 15, 2012 Report Share Posted May 15, 2012 You can often base this math on the position and size of a window. Quote Link to comment Share on other sites More sharing options...
acantor Posted May 15, 2012 Report Share Posted May 15, 2012 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.