This is a little bit annoying, whenever I write the script like this it says duplicate hotkey even though the keys that you have to press are different:
0 & Space::7
Up & Space::7
#If GetKeyState("0", "P")
Up & Space::R
Hotkey problem
Re: Hotkey problem
I ran your posted script without error. The error is in the part of your script that is not posted. Within any context, each hotkey must be unique.
To find the error:
1. See where the error message indicates, "Error at line ..."
2. Go to that line in your script.
To find the error:
1. See where the error message indicates, "Error at line ..."
2. Go to that line in your script.
Re: Hotkey problem
Sorry Mikey, I forgot to mention that I put the GetKeyState part first which is what produces the error. The thing is that if I try to put it last it simply wouldn't work.
Re: Hotkey problem
Looks like we found the solution!
Explained: https://www.autohotkey.com/docs/commands/_If.htm#Basic_Operation
Alternative: if you found the script that works, use it!
Explained: https://www.autohotkey.com/docs/commands/_If.htm#Basic_Operation
Next time: instead of posting a working script, post the script that doesn't work (well, OK, at least if you need help)!To turn off context sensitivity, specify #If or any #IfWin directive but omit all the parameters.
Alternative: if you found the script that works, use it!
Re: Hotkey problem
Ooh I see what you mean, I appreciate the kindness from you Mikey. I am very confused about this #If thing , I tried these below but they didn't work:
#If
GetKeyState("0", "P")
Up & Space::7
#If GetKeyState("0", "P")
Up & Space::7
#If
I don't fully understand the explanation from the link, it is a little bit too wordy to be honest.
#If
GetKeyState("0", "P")
Up & Space::7
#If GetKeyState("0", "P")
Up & Space::7
#If
I don't fully understand the explanation from the link, it is a little bit too wordy to be honest.
Re: Hotkey problem
Perhaps:
Code: Select all
#If GetKeyState("0", "P")
Up & Space::R
#If
0::0
Up::Up
0 & Space::7
Up & Space::7