MiTKiNG
03-16-2011, 09:38 AM
Hi everyone,
i have some ahk scripting problem. Lets see if anyone can give me a hand on this. Im using the new HL2.0 and i have a module for runing pc games. Like each pc game is a world by itself, i have done an if else statements for doing specific things per game based.
For launching a lnk without doing anything else im doing this:
Run,%romPath%%romName%
ExitApp
So, for doing specific things im doing this:
if (romName="House of the Dead 3") {
} else if (romName="Crazy Power Disc Perfect") {
} else if (romName="Street Fighter IV") {
} else {
}
Everything is right and working. But my problem is when i remap keys in one of the ifs statements. The remaped keys are always trigered when launching a pc game. If i do this:
if (romName="House of the Dead 3") {
1::Enter
w::g
e::h
r::j
t::k
} else if (romName="Crazy Power Disc Perfect") {
} else if (romName="Street Fighter IV") {
} else {
}
and i launch street fighter 4, the house of the dead keys assigment has done and thats not what i want. Moreover if i define the same mapping in other if statement, ahk gives me an error of a duplicate assignment.
This is giving an assignment error:
if (romName="House of the Dead 3") {
1::Enter
w::g
e::h
r::j
t::k
} else if (romName="Crazy Power Disc Perfect") {
1::l
} else if (romName="Street Fighter IV") {
t::p
} else {
}
I hope have explained myself. Do you know how to solve this?
Thank you in advance!
i have some ahk scripting problem. Lets see if anyone can give me a hand on this. Im using the new HL2.0 and i have a module for runing pc games. Like each pc game is a world by itself, i have done an if else statements for doing specific things per game based.
For launching a lnk without doing anything else im doing this:
Run,%romPath%%romName%
ExitApp
So, for doing specific things im doing this:
if (romName="House of the Dead 3") {
} else if (romName="Crazy Power Disc Perfect") {
} else if (romName="Street Fighter IV") {
} else {
}
Everything is right and working. But my problem is when i remap keys in one of the ifs statements. The remaped keys are always trigered when launching a pc game. If i do this:
if (romName="House of the Dead 3") {
1::Enter
w::g
e::h
r::j
t::k
} else if (romName="Crazy Power Disc Perfect") {
} else if (romName="Street Fighter IV") {
} else {
}
and i launch street fighter 4, the house of the dead keys assigment has done and thats not what i want. Moreover if i define the same mapping in other if statement, ahk gives me an error of a duplicate assignment.
This is giving an assignment error:
if (romName="House of the Dead 3") {
1::Enter
w::g
e::h
r::j
t::k
} else if (romName="Crazy Power Disc Perfect") {
1::l
} else if (romName="Street Fighter IV") {
t::p
} else {
}
I hope have explained myself. Do you know how to solve this?
Thank you in advance!