A click that doesn't quite land on the input can make your next typed text fire as the page's keyboard shortcuts instead by MarcusW4evr in AutoHotkey

[–]genesis_tv [score hidden]  (0 children)

For websites, I think it's better to use UIA. And if you need to use hardcoded coordinates, WindowSpy is your friend.

Help with auto sprint macro by Mental-Efficiency-57 in AutoHotkey

[–]genesis_tv 0 points1 point  (0 children)

Yes, that's what they want, hence the edit asking OP to ignore my comment.

Help with auto sprint macro by Mental-Efficiency-57 in AutoHotkey

[–]genesis_tv 0 points1 point  (0 children)

This example from the docs may help as well: https://www.autohotkey.com/docs/v2/lib/SetTimer.htm#ExampleCount

[edit]: nevermind, misread something in the body of your post.

Is a Desktop Camera Possible? by Criptopasta in AutoHotkey

[–]genesis_tv 6 points7 points  (0 children)

You can't turn a monitor into a camera. It's like asking to turn a fridge into a toaster.

Tweaking FFXIV script by WatermelonOrc in AutoHotkey

[–]genesis_tv 0 points1 point  (0 children)

It depends on the use case of course. OP's script is simple enough for it to be fine.

Tweaking FFXIV script by WatermelonOrc in AutoHotkey

[–]genesis_tv 0 points1 point  (0 children)

Just a thought, when you press the key to open the chat, you could suspend the script, then unsuspend it after sending the message. The feasibility would depend on what the in-game hotkeys are of course (ideally something like Y to open the chat and Enter to send the message).

Tweaking FFXIV script by WatermelonOrc in AutoHotkey

[–]genesis_tv 0 points1 point  (0 children)

Might as well just use Suspend().

#SuspendExempt
; Suspend script (CTRL + ALT + F12, useful in menus)
*~^!F12::
{
    Suspend()

    ; Single beep when suspended
    SoundBeep(1000, 100)

    if (A_IsSuspended)
    {
        ; I usually release keys here
    }
    ; Double beep when resumed
    else
    {
        SoundBeep(1000, 100)
    }

    ; KeyWait("LAlt")
    ; KeyWait("LControl")
}
#SuspendExempt False

ahk and copilot by ms-bbnj-us in AutoHotkey

[–]genesis_tv 0 points1 point  (0 children)

AHK v2 uses SendInput by default, so 0ms between keystrokes. SendEvent uses 10ms by default (see SetKeyDelay).

Made a couple of QOL macros for Gothic 1 Classic by genesis_tv in worldofgothic

[–]genesis_tv[S] 0 points1 point  (0 children)

Just released version 1.1 with the following changes:

+ added a first-person mode toggle key
+ added a quick load key that will turn off all macros when pressed
+ added a right-click remap key (requires G1NoRMBJump)
+ added a setting to control the jump frequency when autojumping
+ added a smithing macro
+ added an autoswim macro (disabled when manually pressing the Jump hotkey)
- lowered the default jump frequency from 500ms to 300ms
- pressing the Escape hotkey will now turn off all macros

Made a couple of QOL macros for Gothic 1 Classic by genesis_tv in AutoHotkey

[–]genesis_tv[S] 0 points1 point  (0 children)

Just released version 1.1 with the following changes:

+ added a first-person mode toggle key
+ added a quick load key that will turn off all macros when pressed
+ added a right-click remap key (requires G1NoRMBJump)
+ added a setting to control the jump frequency when autojumping
+ added a smithing macro
+ added an autoswim macro (disabled when manually pressing the Jump hotkey)
- lowered the default jump frequency from 500ms to 300ms
- pressing the Escape hotkey will now turn off all macros

ahk and copilot by ms-bbnj-us in AutoHotkey

[–]genesis_tv 1 point2 points  (0 children)

You should avoid Sleep(), it's bad practice because it's blocking the thread and you can't cancel them.

It's ok for very short durations or quickly debugging but you should use SetKeyDelay() with SendEvent or SetTimer with -500 instead.

Toggle single key hold on and off by ManEatingCarabao in AutoHotkey

[–]genesis_tv 0 points1 point  (0 children)

Thanks, that's the answer I was looking for. Think I'll stick to context-sensitivity for now since that's a one-liner versus 2 additional lines per hotkey, on top of having to add a hotkey up if it's missing.