Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Just want to click, 1, enter, repeat


  • Please log in to reply
7 replies to this topic
Shawncav
  • Members
  • 4 posts
  • Last active: Mar 19 2010 02:01 AM
  • Joined: 19 Mar 2010
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.

None
  • Members
  • 3199 posts
  • Last active: Nov 05 2015 09:55 PM
  • Joined: 28 Nov 2009
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
$[hotkey]:: ;try adding the $ modifier
click 
Send, 1{enter} 
Return
Why keep the Hotkey secret by putting in [hotkey] instead of your actual key :?:

MasterFocus
  • Moderators
  • 4323 posts
  • Last active: Jan 28 2016 01:38 AM
  • Joined: 08 Apr 2009
Show your code. Also, what program are you dealing with?

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Antonio França -- git.io -- github.com -- ahk4.net -- sites.google.com -- ahkscript.org

Member of the AHK community since 08/Apr/2009. Moderator since mid-2012.


Shawncav
  • Members
  • 4 posts
  • Last active: Mar 19 2010 02:01 AM
  • Joined: 19 Mar 2010
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.

Shawncav
  • Members
  • 4 posts
  • Last active: Mar 19 2010 02:01 AM
  • Joined: 19 Mar 2010
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.

None
  • Members
  • 3199 posts
  • Last active: Nov 05 2015 09:55 PM
  • Joined: 28 Nov 2009
Are you holding the key or just pressing it?
If you do it this way
\::
KeyWait \
Click
Send, 1{enter} 
Return
you only get one per press no matter how long you hold the key.

None
  • Members
  • 3199 posts
  • Last active: Nov 05 2015 09:55 PM
  • Joined: 28 Nov 2009
Looked again and thought maybe you do want the hold down
\::
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


Shawncav
  • Members
  • 4 posts
  • Last active: Mar 19 2010 02:01 AM
  • Joined: 19 Mar 2010
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.