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 

Macro stops whenever CTRL, ALT or Shift is pressed.

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



Joined: 16 Nov 2009
Posts: 7

PostPosted: Mon Nov 16, 2009 6:56 am    Post subject: Macro stops whenever CTRL, ALT or Shift is pressed. Reply with quote

I'm using this simple script for rapidfire with the mouse:

Ins::Suspend
LButton::
Loop
{
SetMouseDelay 30
Click
If (GetKeyState("LButton","P")=0)
Break
}

But whenever CTRL, ALT, or Shift is pressed before pressing left click, it stops the macro from working. Any way to fix this??

Thanks Smile
Back to top
View user's profile Send private message
tonne



Joined: 06 Jun 2006
Posts: 1475
Location: Denmark

PostPosted: Mon Nov 16, 2009 7:15 am    Post subject: Reply with quote

Try
Code:
*LButton:
...
Return

_________________
there's a dog barking close within the range of my ear
sounds like he wants to escape the chain
he would probably bite me to death if he could
but the chain lets me spit in his face

- Kashmir
Back to top
View user's profile Send private message
HKPolice



Joined: 16 Nov 2009
Posts: 7

PostPosted: Mon Nov 16, 2009 7:44 am    Post subject: Reply with quote

tonne wrote:
Try
Code:
*LButton:
...
Return


Thanks, that works!

But now I have another problem. For some reason, the program is pressing CTRL when I'm holding Alt + mouse1, then switching to A + mouse1. (I use ALT for strafing right and A for strafing left, CTRL for changing weapons)

So basically whenever I strafe right while firing, then start strafing left, the game changes weapons. Sad

I tried unbinding CTRL and it stopped changing weapons so I know it's not the game's fault, its AHK pressing CTRL for some reason. Any ideas?

Thanks again!

Edit: just did some more testing and as long as I'm pressing ALT first while holding Mouse1, then as soon as I let go of ALT, AHK will send 2 CTRL keys for some reason. Sad

I can see them in the key history & key info screen like this:

01 000 i u 0.02 LButton
A4 038 d 0.02 Alt
A4 038 u 0.03 Alt
A2 01D i d 0.00 Ctrl
A2 01D i u 0.00 Ctrl
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   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