AutoHotkey Community

It is currently May 27th, 2012, 6:20 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: December 6th, 2010, 1:53 am 
Offline

Joined: December 6th, 2010, 1:04 am
Posts: 4
Yet again im sure you guys are tired of these posts but will make it quick! :D

This is what i have so far. kind of a frankenstein of a few autofire scrips + a little of some stuff i know. If capslock is pressed it will toggle autofire if not it wont, also the autofire is random to get base the CoD: BO autofire blocking.... i think heh. Im using a Xim360 via a pc to use a keyboard and mouse for the xbox. Anyhow i think it all works ok apart from 1 little thing im probably doing something real stupid so advice is welcome. The problem is when L clicking its also pressing the capslock over and over and over. Can anyone give me a hand to stop this? Maby its not im not sure but on the logitech software i see capslock on/off flashing on the screen along with the caps led flashing.
Thanks a load
Alex

Code:
*$LButton::
GetKeyState, CapsState, CapsLock, T
If (CapsState = "D")
{
Loop
   {
   if not GetKeyState("LButton", "P")
      {
      break
      }
   else
      {



      Send {click}
      Random, random, 125, 175
      Sleep %random%
      }
   }
}
else
{
Click Down
}
return


*LButton Up::Click up


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 6th, 2010, 2:06 am 
Offline

Joined: November 28th, 2009, 4:45 am
Posts: 3089
If you use AHKL it can be a little simpler
Code:
#if GetKeystate("Capslock","t")
*$LButton::
While GetKeyState("LButton","p")
 {
 Send {Blind}{LButton} ;blind prevents the automatic release of caps lock when a key is sent
 Random, random, 125, 175
 Sleep %random%
 }
Return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 6th, 2010, 2:15 am 
Offline

Joined: October 26th, 2009, 6:29 am
Posts: 362
Try:
Code:
Click
Instead of:
Code:
Send, {Click}


This corrects your bug, I played with this for nearly 10 minutes before I finally realized this simple fix... :oops:


EDIT:
None hit it another way:
None wrote:
Code:
Send, {Blind}{LButton} ;blind prevents the automatic release of caps lock when a key is sent

_________________
Check out the new AHK forum competition!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 6th, 2010, 2:18 am 
Offline

Joined: December 6th, 2010, 1:04 am
Posts: 4
Wow thanks guys. Was driving me nuts and was about to start from scratch again. Will give it a bash tomorrow and see if it need fine tuning.

Thanks again!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 6th, 2010, 12:19 pm 
Offline

Joined: December 6th, 2010, 1:04 am
Posts: 4
OK that works great! Only problem is BO on the xbox has a firerate cap so if you fire too fast it will jam your weapon. Also sometimes it makes you jump for an unknown reason. Guess its to stop the autofire controllers.
Guess i have to work out the perfect timing to be right on the edge of the cap. Dont suppose anyone knows the caps for these guns? M14 Fal G11 and M16 (in CoD Bo)

Thanks again!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 25th, 2010, 11:28 pm 
Offline

Joined: December 6th, 2010, 1:04 am
Posts: 4
OK little more help needed. I must be so freaking stupid...

Code:
*$RButton::
GetKeyState, CapsState, CapsLock, T
If (CapsState = "D")
{
Loop
   {
   if not GetKeyState("RButton", "P")
      {
      break
      }
   else
      {
      Send,{Blind} {RButton}
      Random, random, 50, 100
      Sleep %random%
      }
   }
}
else
{
Click Down
}
return
*RButton Up::Click up


Is this is my L Button scrip. But now when ever i used the scrip normaly with out the capslock toggles it wont rigth click only left click..... what am i doing wrong?


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: hd0202 and 54 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