I want to turn on my autohotkey on 3 and 4, and deactivate them on different keys (1,2,4,5,f,tab,Xbutton1)
Current script:
LButton::
lbutton_count++
If (lbutton_count = 1)
{
Send {4}
Sleep, 690
Send {LButton}
}
If (lbutton_count = 2)
{
Send {3}
Sleep, 690
Send {LButton}
}
If (lbutton_count = 2)
{
lbutton_count := 0
}
return
PgDn::Suspend
Searching the right keys
-
- Posts: 9
- Joined: 19 May 2018, 20:41
Re: Searching the right keys
Hallo,
add:
add:
Code: Select all
1::Suspend, On
2::Suspend, On
3::Suspend, Off
4::Suspend, Toggle
5::Suspend, On
f::Suspend, On
Tab::Suspend, On
Xbutton1::Suspend, On
-
- Posts: 9
- Joined: 19 May 2018, 20:41
Re: Searching the right keys
Rohwedder wrote:Hallo,
add:Code: Select all
1::Suspend, On 2::Suspend, On 3::Suspend, Off 4::Suspend, Toggle 5::Suspend, On f::Suspend, On Tab::Suspend, On Xbutton1::Suspend, On
Added this, doesn't work as i wanted it. It stops the current script, switching from 3 to 4 and backwards.
3 and 4 arn't working with the script, i cannot use weapon slot 3 or 4 with the script i'm trying to use with it, 1,2,5,f,tab,xbutton1 is working to ignore the script with adding this code ^
Re: Searching the right keys
Elaborate, because what you described mismatches provided code. To me it seems like XButton1 is changing modes of something.
Use
Code: Select all
[/c] forum tag to share your code.
Click on [b]✔[/b] ([b][i]Accept this answer[/i][/b]) on top-right part of the post if it has answered your question / solved your problem.
Re: Searching the right keys
Hallo,
My problem is, I do not know what you want.
Try with hotkey prefixes "~" and/or "$".
Tilde: ~ prefix when the hotkey fires, its key's native function will not be blocked
Dollar: $ prefix is necessary if the script uses the Send command to send the keys that comprise the hotkey itself, which might otherwise cause it to trigger itself.
E.g.:
My problem is, I do not know what you want.
Try with hotkey prefixes "~" and/or "$".
Tilde: ~ prefix when the hotkey fires, its key's native function will not be blocked
Dollar: $ prefix is necessary if the script uses the Send command to send the keys that comprise the hotkey itself, which might otherwise cause it to trigger itself.
E.g.:
Code: Select all
~1::Suspend, On
~2::Suspend, On
~$3::Suspend, Off
~$4::Suspend, Toggle
~5::Suspend, On
~f::Suspend, On
~Tab::Suspend, On
~Xbutton1::Suspend, On
-
- Posts: 9
- Joined: 19 May 2018, 20:41
Re: Searching the right keys
Rohwedder wrote:Hallo,
My problem is, I do not know what you want.
Try with hotkey prefixes "~" and/or "$".
Tilde: ~ prefix when the hotkey fires, its key's native function will not be blocked
Dollar: $ prefix is necessary if the script uses the Send command to send the keys that comprise the hotkey itself, which might otherwise cause it to trigger itself.
E.g.:Code: Select all
~1::Suspend, On ~2::Suspend, On ~$3::Suspend, Off ~$4::Suspend, Toggle ~5::Suspend, On ~f::Suspend, On ~Tab::Suspend, On ~Xbutton1::Suspend, On
This is working almost perfectly, i was searching for this! except one problem occurs, when switching to weapon slot 3/4 it will switch from 3 to 4 or vice versa before it (shoots) fully works, in other words; when switched on 3 or 4, it will switch first before taking a shot.
I came to realise this is the cause of my own script, yours has been very helpfull and i will implent it in my new one, many thanks!