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 

Just want to click, 1, enter, repeat

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Shawncav



Joined: 19 Mar 2010
Posts: 4

PostPosted: Fri Mar 19, 2010 2:28 am    Post subject: Just want to click, 1, enter, repeat Reply with quote

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.
Back to top
View user's profile Send private message
None



Joined: 28 Nov 2009
Posts: 3086

PostPosted: Fri Mar 19, 2010 2:40 am    Post subject: Reply with quote

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 Question
Back to top
View user's profile Send private message
MasterFocus



Joined: 08 Apr 2009
Posts: 3035
Location: Rio de Janeiro - RJ - Brasil

PostPosted: Fri Mar 19, 2010 2:42 am    Post subject: Reply with quote

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.
"

Antonio França
My stuff: Google Profile
Back to top
View user's profile Send private message Visit poster's website
Shawncav



Joined: 19 Mar 2010
Posts: 4

PostPosted: Fri Mar 19, 2010 2:42 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Shawncav



Joined: 19 Mar 2010
Posts: 4

PostPosted: Fri Mar 19, 2010 3:00 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
None



Joined: 28 Nov 2009
Posts: 3086

PostPosted: Fri Mar 19, 2010 3:02 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
None



Joined: 28 Nov 2009
Posts: 3086

PostPosted: Fri Mar 19, 2010 3:12 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Shawncav



Joined: 19 Mar 2010
Posts: 4

PostPosted: Fri Mar 19, 2010 3:32 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
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