Randomize

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
n0rm4l
Newbie
Posts: 8
Joined: Tue Nov 10, 2009 2:54 am

Randomize

Post by n0rm4l » Tue Nov 10, 2009 2:56 am

Hi, I was wondering how do I randomize what the macro clicks. For example, im making a script that answers survey questions but i want the answers to be different in each survey so how do i make it click random answers?

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Nov 10, 2009 3:02 am

Need more specific info about how the selections are made.

Click on buttons?
Click in fixed coordinates?
Click in changing coordinates?
Selecting checkbox from multiple choices?
Clicking on a number from 1-10?

Is this on a web site? Provide link, or save image and save in photobucket.com and insert here in posting.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

n0rm4l
Newbie
Posts: 8
Joined: Tue Nov 10, 2009 2:54 am

Post by n0rm4l » Tue Nov 10, 2009 3:40 am

Selecting checkbox from multiple choices

i want to use it for the website http://www.instantcashsweepstakes.com

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Nov 10, 2009 4:16 am

So, this looks like five boxes, all have the same Y position, so we need to get the X positions for the other five boxes.. Define Box1 - Box5 positions, Move Mouse to box and click.

Here is a rough outline of an approach I might take....

// Define checkbox position coordinates
Let>Box1=X1,Y
Let>Box2=X2,Y
etc.

// Set up to get a random number for N = 1-5
Random>5,vBox
Let>CheckBox=Box%vBox%
MouseMove>%CheckBox%, then LClick

Repeat last three steps as necessary.
=======================

Will need to consider resolution, window size and position when calculating box positions and decide if you need to use fixed or relative positions for MouseMove commands.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts