I have a problem to modify a autofire script to implement it for Street Fighter IV.
Theres a scrit that work flawessly with one key, in this case, the space key. Here's the script:
Code: Select all
#NoEnv
#SingleInstance force
SendMode Input
ScriptActive = 1
FixAmount = 0.00000000000000000001
RecoilFix(amount)
{
DllCall("keybd_event",uint,1,int,x,int,amount,uint ,0,int,0)
}
IfWinActive, Call of Duty 4
{
~space::
If ScriptActive = 1
{
RecoilFix(FixAmount)
Loop
{
GetKeyState, state, space, P
if state=U
break
Sendinput {space down}
Sleep 35
Sendinput {space up}
Sleep 35
RecoilFix(FixAmount)
}
}
return
;Pauses AutoHotKey Script.
~F6::
If ScriptActive = 1
{
ScriptActive = 0
SoundBeep, 400, 400
}
else if ScriptActive = 0
{
ScriptActive = 1
SoundBeep, 1000, 100
SoundBeep, 1000, 100
}
return
~NumpadAdd::
++FixAmount
SoundBeep, 700, 100
SoundBeep, 700, 100
clipboard = %FixAmount%
return
~NumpadSub::
--FixAmount
SoundBeep, 700, 100
clipboard = %FixAmount%
return
~NumpadDiv::
FixAmount-=0.1
SoundBeep, 600, 100
clipboard = %FixAmount%
return
~NumpadMult::
FixAmount+=0.1
SoundBeep, 600, 100
SoundBeep, 600, 100
clipboard = %FixAmount%
return
}
;M9 = FixAmount 1
;G3 = FixAmount 0.700000
t=jab punch
y=strong punch
u=fierce punch
g=short kick
h=forward kick
j=roundhouse kick
The problem is that when I add a key the script show me a error (attached in this post):
The modified part is from this:
Code: Select all
IfWinActive, Call of Duty 4
{
~space::
If ScriptActive = 1
{
RecoilFix(FixAmount)
Loop
{
GetKeyState, state, space, P
if state=U
break
Sendinput {space down}
Sleep 25
Sendinput {space up}
Sleep 25
RecoilFix(FixAmount)
}
}
return
Code: Select all
IfWinActive, Call of Duty 4
{
~t::
~y::
If ScriptActive = 1
{
RecoilFix(FixAmount)
Loop
{
GetKeyState, state, t, P
if state=U
break
Sendinput {t down}
Sleep 25
Sendinput {t up}
Sleep 25
RecoilFix(FixAmount)
}
{
GetKeyState, state, y, P
if state=U
break
Sendinput {y down}
Sleep 25
Sendinput {y up}
Sleep 25
RecoilFix(FixAmount)
}
}
return
Please halp!