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 

Macro to send random number every 5 minutes
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
sa0sin



Joined: 19 Aug 2008
Posts: 9

PostPosted: Tue Aug 19, 2008 9:15 pm    Post subject: Reply with quote

I tried that 1 didnt work it just launched but did nothing
Back to top
View user's profile Send private message
Sivvy



Joined: 21 Jul 2008
Posts: 711
Location: Calgary, AB, Canada

PostPosted: Wed Aug 20, 2008 12:44 pm    Post subject: Reply with quote

Try this. It sounds like your system has too much going on, and the script is being pushed to the back of the line. This should make it Take precedence over most other running applications.

Code:
#Persistent
Process, Priority, AutoHotkey.exe, High
SendMode, Play

WinWait, Hero OnLine
IfWinNotActive, Hero OnLine
WinActivate, Hero OnLine
WinWaitActive, Hero OnLine

SetTimer, RightClick, 5000 ;five seconds
SetTimer, 222222, 262000 ;262 seconds
Return

RightClick:
MouseClick, Right, 837, 980
Return
222222:
Send, 222222
Return
Back to top
View user's profile Send private message MSN Messenger
sa0sin



Joined: 19 Aug 2008
Posts: 9

PostPosted: Wed Aug 20, 2008 2:41 pm    Post subject: Reply with quote

well i officially give up on this macro.

i want to do the one i started with

hit any hotkey (1-0) every 5 minutes doesnt mater which number preferably 0.

this 1 should be easy.
Back to top
View user's profile Send private message
Sivvy



Joined: 21 Jul 2008
Posts: 711
Location: Calgary, AB, Canada

PostPosted: Wed Aug 20, 2008 3:09 pm    Post subject: Reply with quote

Read the first script I wrote for you.

Code:
#Persistent
SetTimer, NumberToPick, 300000

NumberToPick:
    Random, NumberToPress, 0, 9
    Send, %NumberToPress%
Return


Does exactly what you want... Every 5 minutes on the dot.
Back to top
View user's profile Send private message MSN Messenger
Guest






PostPosted: Wed Aug 20, 2008 7:57 pm    Post subject: Reply with quote

Sivvy wrote:
Read the first script I wrote for you.

Code:
#Persistent
SetTimer, NumberToPick, 300000

NumberToPick:
    Random, NumberToPress, 0, 9
    Send, %NumberToPress%
Return


Does exactly what you want... Every 5 minutes on the dot.


Looking for something like this my self, but i only want i to click for example 9 every 30sec.

-Kalle


Code:
#Persistent
SetTimer, NumberToPick, 30000

NumberToPick:
    Random, NumberToPress, 9
    Send, %NumberToPress%
Return



Is that the right code for it? no chance of trying until this weekend as im not at home copmuter.
Back to top
Guest






PostPosted: Wed Aug 20, 2008 7:59 pm    Post subject: Reply with quote

Crap! gotta sign up for this forum couldnt edit, i want it to loop aswell.

-Kalle
Back to top
Krogdor



Joined: 18 Apr 2008
Posts: 1145
Location: The Interwebs

PostPosted: Wed Aug 20, 2008 8:02 pm    Post subject: Reply with quote

Anonymous wrote:
Code:
#Persistent
SetTimer, NumberToPick, 30000

NumberToPick:
    Random, NumberToPress, 9
    Send, %NumberToPress%
Return


Is that the right code for it? no chance of trying until this weekend as im not at home copmuter.


Close, but there is no need to random when you only need one number (the syntax is incorrect anyway):
Code:
SetTimer, NumberToPick, 30000

NumberToPick:
    Send, 9
Return
Back to top
View user's profile Send private message AIM Address
Guest






PostPosted: Thu Aug 21, 2008 3:14 am    Post subject: Reply with quote

Krogdor wrote:
Anonymous wrote:
Code:
#Persistent
SetTimer, NumberToPick, 30000

NumberToPick:
    Random, NumberToPress, 9
    Send, %NumberToPress%
Return


Is that the right code for it? no chance of trying until this weekend as im not at home copmuter.


Close, but there is no need to random when you only need one number (the syntax is incorrect anyway):
Code:
SetTimer, NumberToPick, 30000

NumberToPick:
    Send, 9
Return


Thanks!

If i want spacekey to be pushed like every 3min that could be added too?
Back to top
jayarama
Guest





PostPosted: Thu Aug 21, 2008 5:01 am    Post subject: hai win Reply with quote

Laughing Rolling Eyes
Back to top
Krogdor



Joined: 18 Apr 2008
Posts: 1145
Location: The Interwebs

PostPosted: Thu Aug 21, 2008 5:05 am    Post subject: Reply with quote

Space and 9?
Code:
SetTimer, NumberToPick, 30000

NumberToPick:
    Send, 9{space}
Return

Or just Space?
Code:
SetTimer, NumberToPick, 30000

NumberToPick:
    Send, {space}
Return
Back to top
View user's profile Send private message AIM Address
sa0sin



Joined: 19 Aug 2008
Posts: 9

PostPosted: Sat Aug 23, 2008 11:53 am    Post subject: Reply with quote

well i tried it and it didnt seem to work out .

it didnt click the number 0 or 9 on the hotkey.

i dont know why. autohotkey was running and nothing seems to be acitve in the game.

thanks ahead of time
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
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