Search found 4014 matches

by evilC
Yesterday, 12:09
Forum: Gaming
Topic: Please help with button spamming Topic is solved
Replies: 6
Views: 83

Re: Please help with button spamming Topic is solved

Further to Acuena's post, you can use Pause to pause the *whole* script. As long as while the spam loop is off, there is no other code running, this would allow you to pause and unpause the script with a hotkey. However, if you pause then unpause, it will resume where it left off, mid-loop, so you m...
by evilC
Yesterday, 06:06
Forum: Gaming
Topic: Loop problem ?
Replies: 7
Views: 88

Re: Loop problem ?

Bear in mind that with normal AHK commands, you have no guarantees that each PixelGetColor check is actually on the same frame of animation. You might want to try out my CGDipSnapshot library, which allows you take one snapshot of part of the screen, then do pixel inspection on the snapshot, ensurin...
by evilC
Yesterday, 05:58
Forum: Gaming
Topic: Script to use hotkeys for low and high dpi.
Replies: 1
Views: 31

Re: Script to use hotkeys for low and high dpi.

LGS will not see any keys sent by AHK, and I know of no way around that.
The only thing I know how to do is implement my own DPI switch by hiding some of the input.
https://autohotkey.com/boards/viewtopic.php?t=10159 sample script 3
by evilC
Yesterday, 05:55
Forum: Ask For Help
Topic: KeyPress before/after MouseClick(and hold) // remapping "RButton Down" Topic is solved
Replies: 11
Views: 115

Re: KeyPress before/after MouseClick(and hold) // remapping "RButton Down" Topic is solved

It's not that trivial TBH, but here is some code that removes all the sleeps. Not sure if it will behave any differently though, it will probably need some more work to handle the case when you re-press a button within the timeout time (While the timer is running) #SingleInstance force ; Block RButt...
by evilC
Yesterday, 05:39
Forum: Gaming
Topic: No "recoil" fortnite
Replies: 6
Views: 1707

Re: No "recoil" fortnite

Considering this thread has plenty of views, I'd imagine that this sort of script would be very sought after. Why not make a general template recoil script so these gamers have something to work off of? I'd imagine for many it's their first exposure to AHK, so it could be pinned to the top. 1) Grea...
by evilC
19 Apr 2018, 14:18
Forum: Gaming
Topic: No "recoil" fortnite
Replies: 6
Views: 1707

Re: No "recoil" fortnite

Because all these people want to do is cheat in an online competitive game - they care nothing about coding or the damage that they are doing to the image of AHK. Some games even refuse to run if AHK is running, precisely because so many people cheat using AHK, then meaning that legitimate users (eg...
by evilC
19 Apr 2018, 13:36
Forum: Ask For Help
Topic: "Exclusive" double tap SHIFT followed by a letter Topic is solved
Replies: 5
Views: 139

Re: "Exclusive" double tap SHIFT followed by a letter Topic is solved

This scenario is non-trivial in AHK generally, due to the inherent "look into the future" nature of the problem, and especially if you want to be able to do it with multiple keys at once (Because of the way AHK threading works) However, in your use-case, you have circumvented a lot of the ...
by evilC
19 Apr 2018, 13:05
Forum: Ask For Help
Topic: Script to Save my Mouse
Replies: 3
Views: 44

Re: Script to Save my Mouse

Yeah, this is probably fixable However, it will mean delaying all button events for the left mouse button by the amount of time that it glitches out for. Basically you block all clicks, and wait to see if it re-presses it again within a certain amount of time. Edit the value of SuppressTime in the s...
by evilC
19 Apr 2018, 12:48
Forum: Ask For Help
Topic: mousewheel sending random CTRLs?
Replies: 1
Views: 26

Re: mousewheel sending random CTRLs?

Try $!WheelUp::sendinput,{Blind}{WheelUp 6}

What $!WheelUp::sendinput,{WheelUp 6} ACTUALLY does when you roll the wheel up whilst ALT is held, is release ALT, send wheel up, then re-press ALT.
{Blind} mode stops this.
by evilC
19 Apr 2018, 12:45
Forum: Gaming
Topic: Checking if a Filename already Exist
Replies: 1
Views: 42

Re: Checking if a Filename already Exist

Whilst you cannot control the name it saves as, if you could find out somehow what name it was *about* to save as, you could maybe rename the file that was going to be overwritten? Failing that, you could maybe have an AHK script which monitors the folder, and when it sees a new file appear, it imme...
by evilC
19 Apr 2018, 12:38
Forum: Gaming
Topic: Mouse Macro
Replies: 1
Views: 48

Re: Mouse Macro

XButton::Q maps press of xb2 to press of q, and release of xb2 to release of q. Send q , on the other hand, by default, presses then *immediately* releases q (As in 0ms gap between press and release), which many games do not like. Try to add SetKeyDelay, 0, 50 to the start of the script, to tell AH...
by evilC
19 Apr 2018, 12:27
Forum: Gaming
Topic: Please help with button spamming Topic is solved
Replies: 6
Views: 83

Re: Please help with button spamming Topic is solved

The #IfWinActive code that you had only enabled / disabled the start / stop hotkey, it had zero effect on the spam loop if it was already running. This version uses WinActive() to check if the window is active before sending any keys. You can still start/stop the macro whether the window is ...
by evilC
19 Apr 2018, 12:12
Forum: Gaming
Topic: Make lean buttons able to be toggled
Replies: 8
Views: 107

Re: Make lean buttons able to be toggled

That code was purely meant to demonstrate that the issue still occurs with stacked hotkeys. If the hotkeys are not triggering in-game, try running the script as admin. If the game still sees the keys, then you can use my AutoHotInterception library to hook into the keys at a driver level - games hav...
by evilC
19 Apr 2018, 07:48
Forum: Gaming
Topic: On/off modifier xbox 360 rt/lt
Replies: 4
Views: 73

Re: On/off modifier xbox 360 rt/lt

Here you go - this technique should save you a TON of coding. It shows you how to use one function to handle watching for release of all buttons and sending the appropriate key up event. I used my own poll loop (Regular GetKeyState instead of XInput like you want), but otherwise the rest of the code...
by evilC
18 Apr 2018, 14:11
Forum: Ask For Help
Topic: KeyPress before/after MouseClick(and hold) // remapping "RButton Down" Topic is solved
Replies: 11
Views: 115

Re: KeyPress before/after MouseClick(and hold) // remapping "RButton Down" Topic is solved

Stacking hotkeys does not alter this behavior at all. Multiple threads can be processing the same line of code, but only one thread can be active at once. F1:: F1 up:: ToolTip, % A_ThisHotkey " START @ " A_TickCount, 0, 0, 1 Sleep 1000 ToolTip, % A_ThisHotkey " END @ " A_TickCoun...
by evilC
18 Apr 2018, 12:36
Forum: Ask For Help
Topic: KeyPress before/after MouseClick(and hold) // remapping "RButton Down" Topic is solved
Replies: 11
Views: 115

Re: KeyPress before/after MouseClick(and hold) // remapping "RButton Down" Topic is solved

Also bear in mind though that if you press and then release within 100ms, it may well fire {z down}{z down}{z up}{z up}, because the release hotkey would interrupt the press hotkey. Once this has happened, the press hotkey code would not resume until the release hotkey code ended (Sleep is a blockin...
by evilC
18 Apr 2018, 11:48
Forum: Ask For Help
Topic: KeyPress before/after MouseClick(and hold) // remapping "RButton Down" Topic is solved
Replies: 11
Views: 115

Re: KeyPress before/after MouseClick(and hold) // remapping "RButton Down" Topic is solved

If you want to enforce a minimum hold-time for keys, then use SetKeyDelay

The above code could be written as:

Code: [Select all]GeSHi © Codebox Plus

SetKeyDelay, 0, 100

RButton::
RButton Up::
Send {z}
return
by evilC
18 Apr 2018, 10:30
Forum: Scripts and Functions
Topic: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
Replies: 105
Views: 2404

Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!

Yes, I am on Win10.
The underlying code that does most of the heavy lifting is .NET, so I guess it could depend on what version of .NET you have installed.
AHI currently targets .NET 4.6.1, although I could probably drop that lower.
by evilC
18 Apr 2018, 06:16
Forum: Gaming
Topic: Make lean buttons able to be toggled
Replies: 8
Views: 107

Re: Make lean buttons able to be toggled

q::ProcessLean("q") e::ProcessLean("e") ProcessLean(key){ static lean_state := 0 if (lean_state != 0){ Send % "{" lean_state " up}" ;~ ToolTip % lean_state " up" wasRelease := (lean_state == key) lean_state := 0 if (wasRelease) return } Send % "...
by evilC
18 Apr 2018, 05:51
Forum: Gaming
Topic: On/off modifier xbox 360 rt/lt
Replies: 4
Views: 73

Re: On/off modifier xbox 360 rt/lt

You know, right, that AVAR is common to ALL buttons?
You hold A, it sets AVAR to b and sends b down. Without releasing A, you hit B, and it sets AVAR to f
When you release A, AVAR is no longer set to b, so it sends f up, not b up.

The script needs a total redesign IMHO.

Go to advanced search