| View previous topic :: View next topic |
| Author |
Message |
Cosmoton Guest
|
Posted: Mon Mar 31, 2008 2:15 am Post subject: Make movements at random intervals |
|
|
Ive been trying to figure out how I can make this program perform an certain action at random times within a certain range. like make it make a type a key or click randomly between 3 to 6 second. I found random number generators but I cant figure out how to actually plug it into the code. If someone could post the code for that, that would be great.
Thanks. |
|
| Back to top |
|
 |
slomz
Joined: 03 Sep 2006 Posts: 608 Location: Iowa, U.S.
|
Posted: Mon Mar 31, 2008 2:22 am Post subject: |
|
|
What code have you got so far? What keys can be pressed? _________________
 |
|
| Back to top |
|
 |
Cosmoton Guest
|
Posted: Mon Mar 31, 2008 6:52 am Post subject: Deleted |
|
|
I deleted it when it didnt work lol. Probably shouldnt have...
I basically did a infinite loop. Any key can be pressed. doesnt really matter. I used a random generator from a previous post. What I tried to do was enter that random number that it generated into the spot "sleep *number here*". Hopefully you see what I mean. I will try to reproduce it. |
|
| Back to top |
|
 |
Rhys
Joined: 17 Apr 2007 Posts: 736 Location: Florida
|
Posted: Mon Mar 31, 2008 1:32 pm Post subject: |
|
|
| Code: | Loop,
{
Send, {Space} ;Press Space
Random,SleepTime,3000,6000 ;Random number 3-6 seconds
Sleep, %SleepTime% ;Sleep for that long
} |
_________________ [Join IRC!]
http://www.codeforcure.org/ |
|
| Back to top |
|
 |
cosmoton Guest
|
Posted: Wed Apr 02, 2008 7:57 am Post subject: Thanks |
|
|
Thanks, exactly what I wanted, nice and simple  |
|
| Back to top |
|
 |
|