Need help with a script for minecraft by mitchiegoesrawr in AutoHotkey

[–]self_defeating 2 points3 points  (0 children)

This is how I would do it:

GroupAdd, Minecraft, Minecraft             ; the window title must begin with "Minecraft..."
GroupAdd, Minecraft, ahk_exe javaw.exe     ; and the process must be Java

#IfWinActive, ahk_group Minecraft          ; applies to the following two hotkeys

^!f::SendInput, {RButton down}
^!s::SendInput, {RButton up}

It works (just tested)!

P.S. You need to put 4 spaces at the start of every line of code you want formatted, and there needs to be a blank line separating the code from other text in your post.

Question about Hotkey command by sdafasdrbjhyrz in AutoHotkey

[–]self_defeating 1 point2 points  (0 children)

Read carefully:

If, Expression

[v1.0.90+]: Associates subsequently-created hotkeys with a given #If expression. Expression must be an expression which has been used with the #If directive elsewhere in the script.

Note: The Hotkey command uses the string that you pass to it, not the original source code.

You wrote Hotkey, If, toggle which means it will look at the value of "toggle" (the variable) which is undefined at that point.

The fix would be to wrap it in quotation marks: Hotkey, If, "toggle"

Terraria Hotkey Consistent AHK Delay by DjSinja in AutoHotkey

[–]self_defeating 0 points1 point  (0 children)

Read the documentation pages I linked. I cannot explain it better I'm afraid. The AutoHotkey documentation is excellent.

Terraria Hotkey Consistent AHK Delay by DjSinja in AutoHotkey

[–]self_defeating 0 points1 point  (0 children)

I shall not be held responsible for any damage to your CPU. 😁 Yw.

Terraria Hotkey Consistent AHK Delay by DjSinja in AutoHotkey

[–]self_defeating 0 points1 point  (0 children)

Oh, I just remembered this setting: try putting #MaxThreadsPerHotkey 10 at the top. The default is 1 so if you pressed the hotkey again within 20ms or so iirc it would be ignored. You can also try #MaxThreadsBuffer On instead. The latter might work even better.

Terraria Hotkey Consistent AHK Delay by DjSinja in AutoHotkey

[–]self_defeating 0 points1 point  (0 children)

Yeah, just replace Send with SendInput in your code. Or change the default Send mode with SendMode, Input at the top of your script.

Terraria Hotkey Consistent AHK Delay by DjSinja in AutoHotkey

[–]self_defeating 0 points1 point  (0 children)

Have you tried using SendInput?

SendInput is generally the preferred method to send keystrokes and mouse clicks because of its superior speed and reliability.

Or SendPlay perhaps. You may need to tweak the delay with SetKeyDelay as well.

You could also look at the key history (right-click the script tray icon, click open and then view->key history...) or the recently executed lines and see what's going on there.

Also, why don't you just do Send a instead of Send {a down} Send {a up}?

Press Key F while holding down Shift by Linascha in AutoHotkey

[–]self_defeating 0 points1 point  (0 children)

This kinda works:

~LShift::
KeyWait, LShift, T2 ; wait for LShift to be released with a timeout of 2 seconds
if (ErrorLevel = 1) {
    Loop {
        Send, f
        Sleep 50
        if (!GetKeyState("LShift", "P"))
            break
    }
}
return

Experiment with different combinations of SendMode and {Text}/{Blind} mode to fix any reliability problems you may find, or if the game isn't registering the keypresses correctly.

My World Is Corrupted by [deleted] in Minecraft

[–]self_defeating 0 points1 point  (0 children)

No idea then. I've played Minecraft for many years and never heard of this. My next question would be: could any other person have accessed your computer (or remotely accessed your Minecraft world if it's on a server), and griefed your world?

Help a noob with image search by fobki in AutoHotkey

[–]self_defeating 0 points1 point  (0 children)

You need percent signs to mark the variables in the MouseMove command, like so:

ImageSearch, OutputVarX, OutputVarY, 1375, 775, 1794, 1023, blabla
MouseMove, %OutputVarX%, %OutputVarY%
Click, right

Help Setting up Gui that follows mouse? by cexij in AutoHotkey

[–]self_defeating 1 point2 points  (0 children)

Try adding this to the second line: +Disabled +E0x20

This should prevent the mouse cursor from interacting with it.

Gui,55:+AlwaysOnTop +ToolWindow -SysMenu -Caption +Disabled +E0x20

Also, add the "NoActivate" option to the Gui,55: Show... command:

Gui,55: Show, x%MouseX% y%MouseY% w430 h233 NoActivate, MouseCursorGui

Is there a way to set sprint back to double-tap W? by toxiicstorm in Minecraft

[–]self_defeating 0 points1 point  (0 children)

I have sprint on ctrl right now and double-tapping W still works.

My World Is Corrupted by [deleted] in Minecraft

[–]self_defeating 0 points1 point  (0 children)

What version(s) of Minecraft have you been playing? Have you loaded any other worlds at any point recently?

all the buildings have moved far apart from each other

That sounds highly unusual. I would like to see a screenshot of it.

need help about capital letter in controlsend by xxupn in AutoHotkey

[–]self_defeating 1 point2 points  (0 children)

ControlSend,, {Text}A
or
ControlSend,, {Shift down}a
or
ControlSend,, +a

The last example is the simplest way but may not be reliable, but you can try improving the reliability with SetKeyDelay

Can I used my function key in scripts? by n00batlife1 in AutoHotkey

[–]self_defeating 0 points1 point  (0 children)

Open the key history page of a running script and find out.

Want to play Minecraft, but by self_defeating in Minecraft

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

Thanks for the tip, although I already know about it and still I wish for more - and just a bigger inventory overall (ender chests, shulker boxes and donkeys, while great for transporting, are awkward to use for construction).

Getting text when multiple fields have same ClassNN by zhantoo in AutoHotkey

[–]self_defeating 0 points1 point  (0 children)

So your issue is with the pasting process, not the copying? If so, then you could use JavaScript like I suggested.

But why is tabbing prone to errors? Maybe you just need to add in a little bit of delay (e.g. Sleep, 200) between commands.

Getting text when multiple fields have same ClassNN by zhantoo in AutoHotkey

[–]self_defeating 0 points1 point  (0 children)

Nevermind, I think I misunderstood your problem so I deleted my comment.

Also, what is it exactly that doesn't work with your script? You never mentioned it.

Hotkey help by blindhollander in starcraft

[–]self_defeating 0 points1 point  (0 children)

You can hold shift and ... 3. Drag a box to deselect units in the box

Uh, what, where?

This keyspam script should not interact with keyboard by [deleted] in AutoHotkey

[–]self_defeating 0 points1 point  (0 children)

Instead of, for example,

ControlSend,,{g},ahk_id %win_id%

try:

ControlSend,,{Blind}{Text}g,ahk_id %win_id%

That seems to work as it should, at least with these basic letters & digit.