Hello,
I am new at AHK and I don't get the programming language :/ .
Indeed I am able to write Java and C++ programms!
I want to do a script spamming the Space button with a delay of 16 ms, if you are holding the Space button AND Overwatch is opened...
I could be able to write one that's spamming, but I don't know how to check, if a programm is opened and how to check, if you are holding the button.
Would be awesome, if someone could help me
And do you know, if you can be banned by doing this?
Greetings
Spamming space button in Overwatch Topic is solved
-
- Posts: 7
- Joined: 22 Mar 2017, 10:06
-
- Posts: 7
- Joined: 22 Mar 2017, 10:06
Re: Spamming space button in Overwatch
Now I ended up with this:
And it works perfectly fine, but I want the button to be spammed when caps is activ and when not to be normaly hold, if you understand what I mean
Help would be perfect!
Greetings
Code: Select all
F5::suspend
*space::
Process, Exist, Overwatch.exe ; check to see if Overwatch.exe is running
{
If ! errorLevel
{
IfExist, C:\Spiele\Battle.net\Overwatch\Overwatch.exe
Loop
{
GetKeyState,state,space,P
if state = U
break
Send,{space}
Sleep,8
}
}
else
{
Send,{space}
}
return
}
Help would be perfect!
Greetings
Re: Spamming space button in Overwatch Topic is solved
You used IfExist, C:\Spiele\Battle.net\Overwatch\Overwatch.exe, but this would be true if Overwatch was installed, but not running or active, as it just checks for the existence of the Overwatch EXE on your disk.
There is a MUCH simpler way of doing this - "Context sensitive hotkeys"
In this way, your hotkey will only be active if the window is active and capslock is on
There is a MUCH simpler way of doing this - "Context sensitive hotkeys"
Code: Select all
#if WinActive("ahk_exe Overwatch.exe") && GetKeyState("CapsLock", "T")
*space::
; Put your hotkey code here
#if
-
- Posts: 7
- Joined: 22 Mar 2017, 10:06
Re: Spamming space button in Overwatch
Thank you very muchevilC wrote:You used IfExist, C:\Spiele\Battle.net\Overwatch\Overwatch.exe, but this would be true if Overwatch was installed, but not running or active, as it just checks for the existence of the Overwatch EXE on your disk.
There is a MUCH simpler way of doing this - "Context sensitive hotkeys"In this way, your hotkey will only be active if the window is active and capslock is onCode: Select all
#if WinActive("ahk_exe Overwatch.exe") && GetKeyState("CapsLock", "T") *space:: ; Put your hotkey code here #if
Re: Spamming space button in Overwatch
By the way, as you are using *space::, you should probably prefix any Send commands with {Blind}: Send {Blind}{Space}
If you do not do this and are holding CTRL when you hit space, AHK will release CTRL, Send Space (Because you asked it to send Space, not CTRL+Space), then re-hold CTRL.
This is ESPECIALLY true if you are using CapsLock, else it may be like a disco in your bedroom
If you do not do this and are holding CTRL when you hit space, AHK will release CTRL, Send Space (Because you asked it to send Space, not CTRL+Space), then re-hold CTRL.
This is ESPECIALLY true if you are using CapsLock, else it may be like a disco in your bedroom
-
- Posts: 7
- Joined: 22 Mar 2017, 10:06
Re: Spamming space button in Overwatch
Thanks for the tipevilC wrote:By the way, as you are using *space::, you should probably prefix any Send commands with {Blind}: Send {Blind}{Space}
If you do not do this and are holding CTRL when you hit space, AHK will release CTRL, Send Space (Because you asked it to send Space, not CTRL+Space), then re-hold CTRL.
This is ESPECIALLY true if you are using CapsLock, else it may be like a disco in your bedroom
Who is online
Users browsing this forum: No registered users and 75 guests