Search found 7704 matches

by Rohwedder
Today, 05:43
Forum: Ask for Help (v2)
Topic: Basic hotkey translation?
Replies: 8
Views: 177

Re: Basic hotkey translation?

Hallo,
try:

Code: Select all

#Requires AutoHotkey v2.0
; instructs AHK to only do these conversions
; when an Notpad window is active
#HotIf WinActive("ahk_exe notepad.exe")
Numpad1::Alt
NumpadEnd::Alt
Numpad2::MButton
NumpadDown::MButton
#HotIf
by Rohwedder
Today, 02:07
Forum: Ask for Help (v1)
Topic: Need help with targetting a background window for spam keys Topic is solved
Replies: 2
Views: 196

Re: Need help with targetting a background window for spam keys Topic is solved

Hallo, perhaps??: F5:: ;On/Off with key F5 If SendEactive := !SendEactive SetTimer SendE, 200 ;spams every 200ms Else SetTimer SendE, Off Return SendE: ;spams key e ControlSend,, {e Down}, xyz Sleep, 30 ControlSend,, {e Up}, xyz Return F4:: ;On/Off with key F4 If Send3active := !Send3active SetTimer...
by Rohwedder
Today, 01:48
Forum: Ask for Help (v1)
Topic: Menu Which Selects Paragraphs?
Replies: 4
Views: 253

Re: Menu Which Selects Paragraphs?

Hallo, perhaps?: FilePath= C:\RunningListOClip.txt FileRead, Contents, %FilePath% Sleep, 1000 Clipboard:= Contents Sleep, 1000 Return #z:: For each, line in StrSplit(Contents, "`r", "`n") Menu, scripts, Add, %line%, Execute Menu, scripts, Show Return Execute: P1 := InStr(Contents, A_ThisMenuItem) P2...
by Rohwedder
Yesterday, 23:45
Forum: Ask for Help (v1)
Topic: help with a script for moving in a circle when pressing "x" Topic is solved
Replies: 4
Views: 383

Re: help with a script for moving in a circle when pressing "x" Topic is solved

Perhaps the speed needs to be reduced? Try:

Code: Select all

x::
N:=0, Keys:=["w Down","a Up","d Down"
,"w Up","s Down","d Up","a Down","s Up"]
While, GetKeyState("x","P") {
	SendEvent,% "{" Keys[++N:=Mod(N, 8)] "}"
	Sleep, 50
}
SendEvent, {a Up}{w Up}{d Up}{s Up}
Return
by Rohwedder
Yesterday, 12:46
Forum: Ask for Help (v2)
Topic: If a key is held, send [action] every [length of time]. Just send keypress if tapped.
Replies: 1
Views: 161

Re: If a key is held, send [action] every [length of time]. Just send keypress if tapped.

Hallo,
try:

Code: Select all

#Requires AutoHotkey v2.0
$Up::Send(Keywait("Up", "T.5")?"{Up}":"q"), Keywait("Up")
$Down::Send(Keywait("Down", "T.5")?"{Down}":"w"), Keywait("Down")
You have to test whether the script can press the fn key
https://www.autohotkey.com/docs/v2/KeyList.htm#SpecialKeys
by Rohwedder
Yesterday, 11:17
Forum: Ask for Help (v1)
Topic: WinWaitClose prevents other timer?
Replies: 1
Views: 177

Re: WinWaitClose prevents other timer?

Hallo, in your timer one() is a sleep 3000 i.e. 3 seconds. With SetTimer, one, 1000 you demand that the script should sleep for three seconds every second? Do you manage to sleep 72 hours every day? A script cannot do several things at the same time! It cannot sleep (Sleep) and wait for a window to ...
by Rohwedder
Yesterday, 07:28
Forum: Ask for Help (v1)
Topic: help with a script for moving in a circle when pressing "x" Topic is solved
Replies: 4
Views: 383

Re: help with a script for moving in a circle when pressing "x" Topic is solved

Hallo,
try:

Code: Select all

x::
N:=0, Keys:=["w Down","a Up","d Down"
,"w Up","s Down","d Up","a Down","s Up"]
While, GetKeyState("x","P")
	SendInput,% "{" Keys[++N:=Mod(N, 8)] "}"
Send, {a Up}{w Up}{d Up}{s Up}
Return
by Rohwedder
12 May 2024, 11:44
Forum: Ask for Help (v2)
Topic: ByRef - Default value - is it possible at the same time?
Replies: 1
Views: 153

Re: ByRef - Default value - is it possible at the same time?

Hallo, try: #Requires AutoHotkey v2.0 #SingleInstance Force A := 1, B:= 2, Yes := "No" tstDef(&A, &B) MsgBox A "," B "," Yes ; A,100,Yes tstDef(&val1, &val2, val3:="Yes") { Global val1 := "A" val2 := 100 %val3% := val3 } Regarding %val3% := val3 see https://www.autohotkey.com/docs/v2/Variables.htm#...
by Rohwedder
12 May 2024, 10:57
Forum: Ask for Help (v2)
Topic: How to wait for the key "AltGr" to be pressed down or released ?
Replies: 2
Views: 155

Re: How to wait for the key "AltGr" to be pressed down or released ?

Hallo,
try:

Code: Select all

#Requires AutoHotkey v2.0
F12:: {
    if KeyWait("RAlt", "d")
        MsgBox("AltGr or RAlt")
}
by Rohwedder
12 May 2024, 05:42
Forum: Gaming Help (v1)
Topic: How do i run on keydown
Replies: 3
Views: 174

Re: How do i run on keydown

Then:

Code: Select all

LAlt::SoundBeep ; left Alt Key: triggered on keydown input
RAlt::SoundBeep ; right Alt Key: triggered on keydown input
by Rohwedder
12 May 2024, 02:22
Forum: Ask for Help (v2)
Topic: About using PixelSearch for a single pixel Topic is solved
Replies: 2
Views: 190

Re: About using PixelSearch for a single pixel Topic is solved

Hallo, I compared it with a PixelMatchColor2() based on ImageSearch. Result: No relevant difference in speed! Try: #Requires AutoHotkey v2.0 CoordMode "Pixel", "Screen" q:: { x:=100, y:=100 , Color := 0x2D7D9B, Variance := 10 T := A_TickCount Loop 100 PixelMatchColor(x, y, Color, Variance) T1 := A_T...
by Rohwedder
11 May 2024, 10:56
Forum: Ask for Help (v2)
Topic: Subscripts
Replies: 8
Views: 288

Re: Subscripts

Hallo, try: #Requires AutoHotkey v2.0 #SingleInstance char := Map( 'a', Chr(8336) , 'e', Chr(8337) , 'h', Chr(8341) , 'i', Chr(7522) , 'j', Chr(11388) , 'k', Chr(8342) , 'l', Chr(8343) , 'm', Chr(8344) , 'n', Chr(8345) , 'o', Chr(8338) , 'p', Chr(8346) , 'r', Chr(7523) , 's', Chr(8347) , 't', Chr(83...
by Rohwedder
11 May 2024, 10:42
Forum: Gaming Help (v1)
Topic: ControlClick
Replies: 1
Views: 212

Re: ControlClick

Hallo,
try:

Code: Select all

F8::
IF Down := !Down { ; toggles Left and Right mouse button down/up
	ControlClick,, ahk_exe java.exe,, Left,, D
	ControlClick,, ahk_exe java.exe,, Right,, D
} Else {
	ControlClick,, ahk_exe java.exe,, Left,, U
	ControlClick,, ahk_exe java.exe,, Right,, U
} Return
by Rohwedder
11 May 2024, 10:18
Forum: Gaming Help (v1)
Topic: How do i run on keydown
Replies: 3
Views: 174

Re: How do i run on keydown

Hallo,
apart from Control::, Alt:: and Shift:: all simple Hotkeys are triggered on keydown input.
I.e. what you want is the default.

Code: Select all

q::SoundBeep ; triggered on keydown input
Control::SoundBeep ; triggered on keyup input
Does "ULTRAKILL" also help against real-life mosquitoes?
by Rohwedder
11 May 2024, 04:04
Forum: Ask for Help (v1)
Topic: Trying to press keys based on color.
Replies: 1
Views: 263

Re: Trying to press keys based on color.

Hallo, try: key := {0x161015: 12, 0x0000FF: 3, 0x00FF00: 1, 0xFF0000: 2} [:: SetTimer, Spam, % (on := !on) ? 1000 : "Off" SoundBeep, 1000 + 500 * on Return Spam: PixelGetColor, bgr, 184, 711 ; Blue-green-red; coordinates relative to the active window Loop, Parse,% key[bgr] Send, {%A_LoopField%} Retu...
by Rohwedder
11 May 2024, 02:51
Forum: Ask for Help (v1)
Topic: Can't make key be held down Topic is solved
Replies: 2
Views: 425

Re: Can't make key be held down Topic is solved

Hallo, see: https://www.autohotkey.com/docs/v1/misc/RemapController.htm#auto-repeating-controller-buttons Some programs or games might require a key to be sent repeatedly (as though you are holding it down on the keyboard) Try: \::Repeat("o", 30) ; a Timer sends {Blind}{o Down} every 30 ms q::Repeat...
by Rohwedder
10 May 2024, 06:28
Forum: Ask for Help (v1)
Topic: Hotkeys heriarcal priority
Replies: 2
Views: 391

Re: Hotkeys heriarcal priority

Hallo, or: !^f10:: Hotkey, IfWinActive, ahk_exe notepad.exe Hotkey, f10, f10, Off Hotkey, *f10, myLabel return myLabel: msgbox, I’d like this to take precedence while random.exe is active return #IFwinactive, ahk_exe notepad.exe f10:: msgbox, this will be triggered instead return #IF
by Rohwedder
10 May 2024, 03:10
Forum: Gaming Help (v1)
Topic: WoW with AHK PixelGetColor
Replies: 2
Views: 234

Re: WoW with AHK PixelGetColor

Hallo,
you could replace all If Color!=000000 with If Color
and all if exiter = 1 with if exiter, but I don't think that would help much.
Maybe it helps to split the big loop into several scripts which are switched on and off by the main script.
@joedf this is an Autohotkey v1.1 script.

Go to advanced search