AutoHotkey Community

It is currently May 27th, 2012, 3:00 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: March 19th, 2010, 3:28 am 
Offline

Joined: March 19th, 2010, 3:01 am
Posts: 4
I'm trying to filling a text box with the number 1, then hit enter.

I have:

[hotkey]::
click
Send, 1{enter}

It is WAY too fast. I usually end up with 111, or 1111 before it registers an enter.

Have tried SetKeyDelay, 10, 10 as line 2, and as line 3.

Have tried Sleep 100 and 100000000000, above send, but with no real results.

This is my first attempt at making a script, and I feel I am close, and have looked for the answer to this, but my frustration is getting the better of me.

Thank you.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 19th, 2010, 3:40 am 
Offline

Joined: November 28th, 2009, 4:45 am
Posts: 3089
The only way I can see for this to be a problem is if your Hotkey is Enter
Or there is more code after and you need a Return
Code:
$[hotkey]:: ;try adding the $ modifier
click
Send, 1{enter}
Return

Why keep the Hotkey secret by putting in [hotkey] instead of your actual key :?:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 19th, 2010, 3:42 am 
Offline

Joined: April 8th, 2009, 8:23 pm
Posts: 3036
Location: Rio de Janeiro - RJ - Brasil
Show your code. Also, what program are you dealing with?

_________________
"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: March 19th, 2010, 3:42 am 
Offline

Joined: March 19th, 2010, 3:01 am
Posts: 4
no reason. I just didn't want it getting lost in the mix, I guess. I was using \. haha I just hit it, and it did the macro. It works well, just repeats too fast. =)

This is to fill a box in a game online. You can use as many "turns" as you want at once, but I've seen there are no negative results when you go 1 at a time. there are when you do more. at times, you could have 3500 turns, so automation would be really nice.

Thanks for the quick initial response.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 19th, 2010, 4:00 am 
Offline

Joined: March 19th, 2010, 3:01 am
Posts: 4
I have turned the repeat rate in the windows keyboard option all the way down. This will function for now, but I'm still going to try to find a way to script it. Thanks for looking.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 19th, 2010, 4:02 am 
Offline

Joined: November 28th, 2009, 4:45 am
Posts: 3089
Are you holding the key or just pressing it?
If you do it this way
Code:
\::
KeyWait \
Click
Send, 1{enter}
Return
you only get one per press no matter how long you hold the key.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 19th, 2010, 4:12 am 
Offline

Joined: November 28th, 2009, 4:45 am
Posts: 3089
Looked again and thought maybe you do want the hold down
Code:
\::
Loop
{
If !GetKeyState("\") ;if you are not holding \ break the loop
   Break
Click
Send, 1{enter}
Sleep 200 ;This is the time between presses
}
Return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 19th, 2010, 4:32 am 
Offline

Joined: March 19th, 2010, 3:01 am
Posts: 4
I am holding it down. The box moves from time to time. I suppose to stop people from scripting to click in it. I want to just aim and shoot.

I'll try your ideas when I get more turns. Man, goofing off is hard work.

Thanks.


Report this post
Top
 Profile  
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], rbrtryn and 30 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