AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Make movements at random intervals

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Cosmoton
Guest





PostPosted: Mon Mar 31, 2008 2:15 am    Post subject: Make movements at random intervals Reply with quote

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.

PostPosted: Mon Mar 31, 2008 2:22 am    Post subject: Reply with quote

What code have you got so far? What keys can be pressed?
_________________
Back to top
View user's profile Send private message AIM Address
Cosmoton
Guest





PostPosted: Mon Mar 31, 2008 6:52 am    Post subject: Deleted Reply with quote

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

PostPosted: Mon Mar 31, 2008 1:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
cosmoton
Guest





PostPosted: Wed Apr 02, 2008 7:57 am    Post subject: Thanks Reply with quote

Thanks, exactly what I wanted, nice and simple Very Happy
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group