 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Adave
Joined: 21 Aug 2009 Posts: 1
|
Posted: Sun Nov 29, 2009 4:30 pm Post subject: D and space in loop |
|
|
hi , ive got this :
insert::
loop,
{
send, {D down}
send, {D up}
send, {Space}
GetKeyState, state, insert, P
if State = U
break
}
if you try it out , you will see that script is continuing even after releasing insert button , it stops after few seconds depending on how long i had been holding insert . Please , how to make it stop right after i release insert ? i cant change send, {D down} and send, {D up} to just send , {D} , script is not working properly then . And second , how to make run loop faster ? its still very slow . thanks for answer. |
|
| Back to top |
|
 |
Astrognaw
Joined: 27 Mar 2009 Posts: 26
|
Posted: Sun Nov 29, 2009 5:13 pm Post subject: |
|
|
| Code: | Sendmode Input
insert::
loop,
{
send, {D down}
send, {D up}
send, {Space}
GetKeyState, state, insert, P
if State = U
break
Sleep, 20
} |
Change the sleep to make it however fast you want it... but you're going to want a sleep in there. SetBatchLines -1 if you want it even faster... |
|
| Back to top |
|
 |
Ace Coder
Joined: 26 Oct 2009 Posts: 361
|
Posted: Sun Nov 29, 2009 5:19 pm Post subject: |
|
|
| Code: | SetBatchLines,-1
While GetKeyState("Insert")
{
SendInput, {D down)
SendInput, {D Up}
SendInput, {Space}
} |
|
|
| Back to top |
|
 |
Astrognaw
Joined: 27 Mar 2009 Posts: 26
|
Posted: Sun Nov 29, 2009 10:34 pm Post subject: |
|
|
Acecoder's script doesn't seem to work for me. It'll continue if I press Insert for 3+ seconds, and it takes another press of insert to stop the D's.
I'm oddly terrible with hotkeys, perhaps this is an OS problem. |
|
| Back to top |
|
 |
a_h_k
Joined: 02 Feb 2008 Posts: 626
|
Posted: Tue Dec 29, 2009 8:05 am Post subject: |
|
|
| Code: | SetBatchLines,-1
While GetKeyState("Insert","P")
{
SendInput, {D down)
SendInput, {D Up}
SendInput, {Space}
} |
 |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|