 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
guest84 Guest
|
Posted: Sun Nov 22, 2009 3:11 am Post subject: random click |
|
|
| 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. |
|
| Back to top |
|
 |
i3egohan
Joined: 18 Jul 2006 Posts: 403
|
Posted: Sun Nov 22, 2009 3:21 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
guest84 Guest
|
Posted: Sun Nov 22, 2009 3:25 am Post subject: |
|
|
| But I need it not to always be the same interval between clicks. |
|
| Back to top |
|
 |
entropic
Joined: 21 Dec 2008 Posts: 181
|
Posted: Sun Nov 22, 2009 3:38 am Post subject: |
|
|
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
|
|
|
| Back to top |
|
 |
guest84 Guest
|
Posted: Sun Nov 22, 2009 4:12 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
sinkfaze
Joined: 18 Mar 2008 Posts: 5044 Location: the tunnel(?=light)
|
Posted: Sun Nov 22, 2009 4:48 am Post subject: |
|
|
| 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. _________________ Try Quick Search for Autohotkey or see the tutorial for newbies. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|