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 

D and space in loop

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



Joined: 21 Aug 2009
Posts: 1

PostPosted: Sun Nov 29, 2009 4:30 pm    Post subject: D and space in loop Reply with quote

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
View user's profile Send private message
Astrognaw



Joined: 27 Mar 2009
Posts: 26

PostPosted: Sun Nov 29, 2009 5:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
Ace Coder



Joined: 26 Oct 2009
Posts: 361

PostPosted: Sun Nov 29, 2009 5:19 pm    Post subject: Reply with quote

Code:
SetBatchLines,-1
While GetKeyState("Insert")
{
SendInput, {D down)
SendInput, {D Up}
SendInput, {Space}
}
Back to top
View user's profile Send private message
Astrognaw



Joined: 27 Mar 2009
Posts: 26

PostPosted: Sun Nov 29, 2009 10:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
a_h_k



Joined: 02 Feb 2008
Posts: 626

PostPosted: Tue Dec 29, 2009 8:05 am    Post subject: Reply with quote

Code:
SetBatchLines,-1
While GetKeyState("Insert","P")
{
SendInput, {D down)
SendInput, {D Up}
SendInput, {Space}
}

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