| View previous topic :: View next topic |
| Author |
Message |
Shawncav
Joined: 19 Mar 2010 Posts: 4
|
Posted: Fri Mar 19, 2010 2:28 am Post subject: Just want to click, 1, enter, repeat |
|
|
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 |
|
 |
None
Joined: 28 Nov 2009 Posts: 3086
|
Posted: Fri Mar 19, 2010 2:40 am Post subject: |
|
|
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  |
|
| Back to top |
|
 |
MasterFocus
Joined: 08 Apr 2009 Posts: 3035 Location: Rio de Janeiro - RJ - Brasil
|
Posted: Fri Mar 19, 2010 2:42 am Post subject: |
|
|
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 |
|
 |
Shawncav
Joined: 19 Mar 2010 Posts: 4
|
Posted: Fri Mar 19, 2010 2:42 am Post subject: |
|
|
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 |
|
 |
Shawncav
Joined: 19 Mar 2010 Posts: 4
|
Posted: Fri Mar 19, 2010 3:00 am Post subject: |
|
|
| 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 |
|
 |
None
Joined: 28 Nov 2009 Posts: 3086
|
Posted: Fri Mar 19, 2010 3:02 am Post subject: |
|
|
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 |
|
 |
None
Joined: 28 Nov 2009 Posts: 3086
|
Posted: Fri Mar 19, 2010 3:12 am Post subject: |
|
|
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 |
|
 |
Shawncav
Joined: 19 Mar 2010 Posts: 4
|
Posted: Fri Mar 19, 2010 3:32 am Post subject: |
|
|
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 |
|
 |
|