AutoHotkey Community

It is currently May 27th, 2012, 2:56 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: D and space in loop
PostPosted: November 29th, 2009, 5:30 pm 
Offline

Joined: August 21st, 2009, 7:43 pm
Posts: 1
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 29th, 2009, 6:13 pm 
Offline

Joined: March 27th, 2009, 1:00 am
Posts: 26
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...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 29th, 2009, 6:19 pm 
Offline

Joined: October 26th, 2009, 6:29 am
Posts: 362
Code:
SetBatchLines,-1
While GetKeyState("Insert")
{
SendInput, {D down)
SendInput, {D Up}
SendInput, {Space}
}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 29th, 2009, 11:34 pm 
Offline

Joined: March 27th, 2009, 1:00 am
Posts: 26
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 29th, 2009, 9:05 am 
Offline

Joined: February 2nd, 2008, 4:35 am
Posts: 643
Code:
SetBatchLines,-1
While GetKeyState("Insert","P")
{
SendInput, {D down)
SendInput, {D Up}
SendInput, {Space}
}

:?:


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], rbrtryn and 29 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group