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 

need help with autofire script

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






PostPosted: Sun Mar 14, 2010 2:53 am    Post subject: need help with autofire script Reply with quote

~Numpad5::
Loop
{
Sleep 100
Send, {Numpad5}
if !GetKeyState("Numpad5","P")
break
}
Return


is my script so far. and it works to an extent

what i dont get is when i'm holding down numpad 5 to shoot forward but then when i want to aim down and i press my down key, it stops the autofire.

what do i add to make it so as long as i hold down the numpad 5 key it'll keep going even if i press different keys at the same time?
Back to top
Michael@Oz



Joined: 08 Nov 2009
Posts: 233
Location: Canberra Oz

PostPosted: Sun Mar 14, 2010 3:40 am    Post subject: Reply with quote

Try
Code:
$~Numpad5::
Back to top
View user's profile Send private message
Guest






PostPosted: Sun Mar 14, 2010 4:26 am    Post subject: Reply with quote

ok so i tried that and it didn't work.

ex. i'm holding down numpad 5 and if i press the downarrow it stops the autofire. but if i hold down arrow then hold down numpad 5 it'll shoot down.

any other suggestions?
Back to top
Michael@Oz



Joined: 08 Nov 2009
Posts: 233
Location: Canberra Oz

PostPosted: Sun Mar 14, 2010 4:42 am    Post subject: Reply with quote

I don't know why it doesn't work, works OK on my XP PC.

Could try
Code:
$~Numpad5::
Loop
{
Sleep 100
Send, {Numpad5}
if !GetKeyState("Numpad5","P")
break
}
Sleep 50
If GetKeyState("Numpad5","P")
     Goto $~Numpad5
Return
Back to top
View user's profile Send private message
Guest






PostPosted: Sun Mar 14, 2010 4:49 am    Post subject: Reply with quote

yea weird.. that doesn't work either..

what its doing is, i'm holding down numpad 5 and it starts autofiring and i'm shooting forward, then i press my down button and it stops the shooting.

but.. if i hold down the down button then hold down numpad 5 i'll shoot down.
Back to top
Guest






PostPosted: Sun Mar 14, 2010 4:51 am    Post subject: Reply with quote

the autofiring part works at least Very Happy until i press a different button. lol.


its like when i'm holding down a button in a notepad it'll go 5555555555s(mydownbutton)
what i need it to do is
55555555s555555555
if that makes any sense :/
Back to top
a_h_k



Joined: 02 Feb 2008
Posts: 626

PostPosted: Sat Mar 20, 2010 6:48 am    Post subject: Reply with quote

Code:
#IfWinActive, <title of game>
*$Numpad5::
  While GetKeyState("Numpad5","P")
  {
    Send {Numpad5}
    Sleep 100
  }
Return
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