Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

none of my hotkeys work in CoD4


  • Please log in to reply
8 replies to this topic
jk212
  • Members
  • 12 posts
  • Last active: May 27 2011 04:22 AM
  • Joined: 22 Apr 2011
im not sure why that is, i tried them in windowed mode, fullscreen mode, turning it on with the game off, with the game on, having the rapid fire actually on when i click onto cod4, nothing works, it just doesnt send the signal or something, they work outside of the game fine, and in other programs like XIM

i tried like 12 different scripts, heres a few of the rapid fire scripts i have

$x::
Loop
{
if not GetKeyState("x", "P")
break
sleep 50
Click
}
return

#NoEnv
SendMode Input
SetMouseDelay, -1
SetKeyDelay, -1

~Tab::             ;Use the space key to quickly toggle the script on & off
         Hotkey, ~LButton, toggle
If toggle != 1
          {
           toggle := 1    ; Will beep if it is set to on
           SoundPlay *84            ;Good because it plays over primary speakers. Others tend to play on motherboard speakers. It's 2008 many computers no longer have motherboard speakers!
           }
else
          {
           toggle := 0        ; Will beep if it is set to off
           SoundPlay *64            ;Good because it plays over primary speakers. Others tend to play on motherboard speakers. It's 2008 many computers no longer have motherboard speakers!
           }

_auto := true

~LButton::autofire()
~^LButton::autofire()
Code:


\::suspend             ;\ key completely suspends the script
autofire()
{
global _auto
if _auto
{
{
Loop
{
if GetKeyState("LButton", "P")
{
Test1 := A_Index            ;Test1 = A variable that carries outside of the loop, A_Index = how many times this specific loop has run.
SendInput {LButton Down}
Random, Sleep, 25, 35
Sleep, %Sleep%            ;Time to wait in MS
{
  If ( mod(Test1, 3) <> 0 )
mouseXY(0,3)
}
SendInput {LButton Up}
Random, Sleep, 25, 54
Sleep, %Sleep%               ;Time to wait in MS
}
else
break
}
} ;; loop
} ;; if
} ;; autofire()

mouseXY(x,y)
{
DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0)
}
return
;;;;;;
;;; End script

#NoEnv 
SendMode Input
SetMouseDelay, -1
SetKeyDelay, -1

~Tab:: 				;Use the space key to quickly toggle the script on & off
         Hotkey, ~Space, toggle 
If toggle != 1 
          { 
           toggle := 1    ; Will beep if it is set to on 
           SoundPlay *84				;Good because it plays over primary speakers. Others tend to play on motherboard speakers. It's 2008 many computers no longer have motherboard speakers!
           } 
else 
          { 
           toggle := 0        ; Will beep if it is set to off 
           SoundPlay *64				;Good because it plays over primary speakers. Others tend to play on motherboard speakers. It's 2008 many computers no longer have motherboard speakers!
           } 

_auto := true 

~Space::autofire() 
~^Space::autofire() 
Code: 


\::suspend 				;\ key completely suspends the script
autofire() 
{ 
global _auto 
if _auto 
{
{
Loop
{ 
if GetKeyState("LButton", "P") 
{ 
Test1 := A_Index				;Test1 = A variable that carries outside of the loop, A_Index = how many times this specific loop has run.
SendInput {Space Down}
Sleep, 35.28019				;Time to wait in MS
SendInput {Space Up}
Sleep, 35.8019					;Time to wait in MS
} 
else
break
}
} ;; loop 
} ;; if 
} ;; autofire() 

mouseXY(x,y) 
{ 
DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0) 
} 
return 
;;;;;; 
;;; End script

~F11::Suspend, toggle

*lbutton::

Loop

{

SetMouseDelay 85

Click

If (GetKeyState("LButton","P")=0)

Break

}

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

Tab::
Loop
{
Tab
If (GetKeyState("Tab","P")=0)
Break
}

and a very basic reload hotkey i just made

~T::Suspend
~E::
SendInput {Click Down}
sleep 30
SendInput {Click Up}
sleep 30
SendInput {R Down}
Sleep 30
SendInput {R Up}
Sleep 900
SendInput {Q Down}
Sleep 40
SendInput {Q Up}
Sleep 65
SendInput {Q Down}
Sleep 40
SendInput {Q Up}

i posted this before but some stuff came up and i couldnt reply to it and i didnt want to revive a dead thread, sorry about that:P

nimda
  • Members
  • 4368 posts
  • Last active: Aug 09 2015 02:36 AM
  • Joined: 26 Dec 2010
<!-- w -->www.autohotkey.com/docs/FAQ.htm#games<!-- w -->

jk212
  • Members
  • 12 posts
  • Last active: May 27 2011 04:22 AM
  • Joined: 22 Apr 2011
ok i tried making it a sendplay command, didnt work, but thats most likely because i have absolutely no clue what im doing

#NoEnv
SendMode Play
SetMouseDelay, -1, Play
SetKeyDelay, -1, Play

~Tab::             ;Use the space key to quickly toggle the script on & off
         Hotkey, ~LButton, toggle
If toggle != 1
          {
           toggle := 1    ; Will beep if it is set to on
           SoundPlay *84            ;Good because it plays over primary speakers. Others tend to play on motherboard speakers. It's 2008 many computers no longer have motherboard speakers!
           }
else
          {
           toggle := 0        ; Will beep if it is set to off
           SoundPlay *64            ;Good because it plays over primary speakers. Others tend to play on motherboard speakers. It's 2008 many computers no longer have motherboard speakers!
           }

_auto := true

~LButton::autofire()
~^LButton::autofire()
Code:


\::suspend             ;\ key completely suspends the script
autofire()
{
global _auto
if _auto
{
{
Loop
{
if GetKeyState("LButton", "P")
{
Test1 := A_Index            ;Test1 = A variable that carries outside of the loop, A_Index = how many times this specific loop has run.
SendPlay {LButton Down}
Random, Sleep, 25, 35, Play
Sleep, %Sleep%            ;Time to wait in MS
{
  If ( mod(Test1, 3) <> 0 )
mouseXY(0,3)
}
SendPlay {LButton Up}
Random, Sleep, 25, 54, Play
Sleep, %Sleep%               ;Time to wait in MS
}
else
break
}
} ;; loop
} ;; if
} ;; autofire()

mouseXY(x,y)
{
DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0)
}
return
;;;;;;
;;; End script

i basicly just changed the word input into play every time i saw it lol

any suggestions?

jk212
  • Members
  • 12 posts
  • Last active: May 27 2011 04:22 AM
  • Joined: 22 Apr 2011
is it something in my game settings maybe? my friend has the same os and he doesnt need to change his hotkeys to get it to work, and its the same game, do i need to do anything in Console or something?

j--hn
  • Members
  • 176 posts
  • Last active: Oct 26 2011 02:42 PM
  • Joined: 16 Apr 2011
Same OS? What OS, XP/Vista/7? If its Vista/7, UAC might have to be turned off.
AHK_Lw 1.1.05, OS: XP SP3, Firefox 3

jk212
  • Members
  • 12 posts
  • Last active: May 27 2011 04:22 AM
  • Joined: 22 Apr 2011
windows 7 64, all the hotkeys work outside of the game, none inside of it, is UAC part of the game?

Retro Gamer
  • Members
  • 24 posts
  • Last active: Aug 25 2018 12:28 AM
  • Joined: 15 Feb 2011
..User Account Control (UAC) can help you prevent unauthorized changes to your computer. It works by prompting you for permission when a task requires administrative rights, such as installing software or changing settings that affect other users. When UAC is on it has a habit of interfering with some programs. You can either turn off UAC or just run autohotkey.exe as Administrator.

j--hn
  • Members
  • 176 posts
  • Last active: Oct 26 2011 02:42 PM
  • Joined: 16 Apr 2011
Its part of windows actually, see User Account Control, some guide to disable it http://www.mydigital...c-in-windows-7/
AHK_Lw 1.1.05, OS: XP SP3, Firefox 3

jk212
  • Members
  • 12 posts
  • Last active: May 27 2011 04:22 AM
  • Joined: 22 Apr 2011
YUEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH!! it worked! iv been trying to figure this out forevah, thanks!