Jump to content
Sign in to follow this  

Random Choice of Scripts

Recommended Posts


Hey all :graduated:

I've created a script that presses on certain places in the screen (MouseClick).

Now I want to insert him a few more lines of MouseClick and let him

randomly choose one of them.

I've looked at Random function but it's only for numbers..

Is it possible

Thank you ;)


I thought maybe an example will help you understand better..

Choice num 1


Choice num 2

Sleep (2000)

Choice num 3

Send($date & {TAB}Title{TAB}Last{TAB}Middle{TAB}First{TAB}Suffix{TAB}2000{TAB}1{TAB}1{TAB}{SPACE})

Now randomly choose between choice number 1, choice number 2 and choice number 3.

This is just an example of clicks. NOT my real script.

So there's no point of using it in you answer :)

Edited by Omga4000

Share this post

Link to post
Share on other sites

You can use "If... ElseIf", "Select Case" or "Switch Case"

Example of switch:

$Random = Random(1, 3, 1)
Switch $Random
;Choice num 1
Case 1
  MouseMove(971, 169)
  ;Choice num 2:
Case 2
  ; Your code...
  ;Choice num 3:
Case 3
  ; Your code...
Edited by Ramzes

Sorry for my bad English but nobody is perfect. [font=arial, helvetica, sans-serif]Ramzes[/font]

Share this post

Link to post
Share on other sites

Thank you! :graduated:

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