AutoHotkey Community

It is currently May 27th, 2012, 1:37 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: random click
PostPosted: November 22nd, 2009, 4:11 am 
anybody know a way to randomize a mouse click. after i put in sleep i want to randomize a number between like 2000-50000 so the clicks r not all the same time. any help would be very appreciated thank you.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 22nd, 2009, 4:21 am 
Offline

Joined: July 18th, 2006, 12:18 pm
Posts: 403
Random click every 5 seconds.

Code:
Loop
{
    Random, randx, 0, %A_ScreenWidth%
    Random, randy, 0, %A_ScreenHeight%
    Click, %randx%, %randy%
    Sleep, 5000 ; random click every 5 seconds
}

F2::ExitApp


Hit F2 to exit.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 22nd, 2009, 4:25 am 
But I need it not to always be the same interval between clicks.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 22nd, 2009, 4:38 am 
Offline

Joined: December 21st, 2008, 7:29 pm
Posts: 181
He basically showed you how to do it...

Code:
Loop
{
    Random, randx, 0, %A_ScreenWidth%
    Random, randy, 0, %A_ScreenHeight%
    ; Generate a random number between 2,000 - 5,000
    Random, sleeptime, 2000, 5000
    Click, %randx%, %randy%
    ; Sleep for 2-5 seconds
    Sleep, %sleeptime%
}

F2::ExitApp


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 22nd, 2009, 5:12 am 
this is what i am using. please help make it random. I am hoping to get the clicks random between 25 seconds and 120 seconds.

loop{

mouseclick, right, 957, 449 ;

sleep 3500

send {ESC} ;

sleep 1500 ;
}
^!p::Pause


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 22nd, 2009, 5:48 am 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
guest84 wrote:
this is what i am using. please help make it random.


They did help you make it random, please try what they suggested. If it doesn't work then post your code so they can look at it and try to help you further.

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Apollo, Bing [Bot], bobbysoon, iDrug, Tipsy3000 and 16 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group