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 

Different not working in program, input broken not output

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





PostPosted: Sat Mar 20, 2010 4:40 pm    Post subject: Different not working in program, input broken not output Reply with quote

I have a autohotkey to change toggle aim in a game to hold aim as follows:
Code:

#SingleInstance Force

Active = 0

*RButton::
IfLess , Active , 2
Send , n
else
send , {RButton Down}
Return

*RButton up::
If Active = 1
Send , n
Else if active = 2
send , {rbutton up}
Return

*+o::
If Active = 1
{
Active = 0 
SoundPlay, %A_WinDir%\Media\windows hardware insert.wav
}
Else
{
Active = 1 
SoundPlay, %A_WinDir%\Media\windows hardware remove.wav
}
Return

*+n::
Active = 2 
SoundPlay, %A_WinDir%\Media\windows ding.wav
Return

*+x::
SoundPlay, %A_WinDir%\Media\windows critical stop.wav , wait
ExitApp


Now it works fine on both my pc and laptop in game in bad company 2 and any thing i try. I want to get it to work on a friends computer but when he has the game running autohotkey does not seem to be receiving the input in the first place, it is not a problem with the send part of the script, its the raw input or direct input of the game exclusively hooking the mouse/keyboard (i have tried both with no luck).

I know this because i looked at his log got him to right click loads and loads with the game up only and the log was empty, no sends or returns.

Is there any way to exclusive take control of inputs? I have looked at things such as keybd hook and mouse hook but i am new to the language and i am sure i would get the syntax incorrect and not know about it without you guys' help.

thanks
Back to top
Michael@Oz



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

PostPosted: Mon Mar 22, 2010 4:43 am    Post subject: Reply with quote

FAQ

But often the game wins....
Back to top
View user's profile Send private message
elltg
Guest





PostPosted: Mon Mar 22, 2010 6:14 pm    Post subject: Reply with quote

Sorry but i dont think you read the post properly. I have been on that faq and viewed plenty of other posts about not working in programs. I was stating that my problem is different.

In most cases of this problem it is that the keys that autohotkey sends to the program are ignored/not received by the game/program.

FAQ:
Quote:
Some games use DirectInput exclusively. As a side-effect, they might ignore all simulated keystrokes and mouse clicks


In this case autohotkey is not receiving input and therefore not executing any code whilst the game is in focus. I was wondering if the input could be hooked driver level instead or anything to this nature. I have already tried the HID scripts on this forum and find again they stop receiving input when the game is in focus.

The strange this is the fact it is only on a certain setup. I may try using the ASID troubleshooting methodology and try a nearly bare boot with no extra services.... possibly some old software my friend had installed with some interesting hook on the mouse/keyboard.
Back to top
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