Omga4000 Posted September 18, 2011 Share Posted September 18, 2011 (edited) Hey all 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 EDIT: I thought maybe an example will help you understand better.. Choice num 1 MouseMove(971,169) MouseDown(left) MouseMove(707,170) MouseUp(left) Choice num 2 MouseClick(left,1172,1004,1) Sleep (2000) MouseClick(left,365,466,1) Choice num 3 Send($date & {TAB}Title{TAB}Last{TAB}Middle{TAB}First{TAB}Suffix{TAB}2000{TAB}1{TAB}1{TAB}{SPACE}) MouseClick(left,1067,443,1) 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 September 18, 2011 by Omga4000 Link to comment Share on other sites More sharing options...
Ramzes Posted September 18, 2011 Share Posted September 18, 2011 (edited) You can use "If... ElseIf", "Select Case" or "Switch Case" Example of switch: $Random = Random(1, 3, 1) ;Switch Switch $Random ;Choice num 1 Case 1 MouseMove(971, 169) ;Choice num 2: Case 2 ; Your code... ;Choice num 3: Case 3 ; Your code... EndSwitch Edited September 18, 2011 by Ramzes Sorry for my bad English but nobody is perfect. [font=arial, helvetica, sans-serif]Ramzes[/font] Link to comment Share on other sites More sharing options...
Omga4000 Posted September 18, 2011 Author Share Posted September 18, 2011 Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now