AutoHotkey Community

It is currently May 27th, 2012, 12:06 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Just need a delay
PostPosted: February 1st, 2011, 5:37 am 
Ok so I am trying to use a this for a game, but I really have no idea how to code very well.

I just want AutoHotkey to number 3 every five seconds. I want to be able to loop this over night.

I would also need something to end the program once I am back in the morning.

Can anyone help me write this?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 1st, 2011, 5:49 am 
Offline

Joined: March 27th, 2009, 1:00 am
Posts: 26
Code:
^3::
Loop
{
   Send, 3
   Sleep 5000
}

Esc::MsgBox Pause
return


after pressing tilde/` key it'll pause and you can close it. lemme know if you want diff keys.

edited it for ctrl 3/esc, but the one below None posted is probably better.


Last edited by Astrognaw on February 1st, 2011, 5:57 am, edited 2 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 1st, 2011, 5:49 am 
I mean, when I hit ctrl 3 on the keyboard. I want that program to loop the number 3 on the keyboard every 5 seconds.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 1st, 2011, 5:51 am 
O perfect :D but how do I make it so the esc button ends the loop?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 1st, 2011, 5:55 am 
Offline

Joined: November 28th, 2009, 4:45 am
Posts: 3089
Code:
^3::SetTimer, Spam, 5000
Esc::SetTimer, Spam, Off
Spam:
Send 3
Return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 1st, 2011, 6:06 am 
They both didn't work.

It seems like both maybe hitting 3 like I want but not on the game. What could be wrong, I know this game doesn't have anything that blocks it.

(keep in mind I am using windows 7 if that means anything) Also maybe i could be running the script wrong.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 1st, 2011, 6:23 am 
Offline

Joined: April 8th, 2009, 8:23 pm
Posts: 3036
Location: Rio de Janeiro - RJ - Brasil
http://www.autohotkey.com/docs/FAQ.htm#games

_________________
"Read the manual. Read it again. Search the forum.
Try something before asking. Show what you've tried.
"
Image
Antonio França
My stuff: Google Profile


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 1st, 2011, 6:57 am 
I read that link and tried a few things but like I said, I don't know what I am doing lol. I tried this

Code:
^4::SetTimer, Spam, 5000
Esc::SetTimer, Spam, Off
Spam:
SendPlay 4
Return

(changed it to 4)
But didn't work :(


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], BrandonHotkey, Yahoo [Bot] and 17 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