Search found 7676 matches
- Today, 12:44
- Forum: Ask for Help (v1)
- Topic: Long press is not working Topic is solved
- Replies: 76
- Views: 2811
Re: Long press is not working Topic is solved
Just to clarify! My backslash Hotkey script above does not require anything in the auto-execute section.
- Today, 12:39
- Forum: Gaming Help (v1)
- Topic: Looking for help on how to not make my key sends redundant and how I could toggle this on and off. Topic is solved
- Replies: 3
- Views: 95
Re: Looking for help on how to not make my key sends redundant and how I could toggle this on and off. Topic is solved
Hallo,
try:
try:
Code: Select all
^k::wdxa:=!wdxa
#IF wdxa
$w::Send n{enter}
$d::Send e{enter}
$x::Send s{enter}
$a::Send w{enter}
$s::Send r{enter}
$z::Send sw{enter}
$c::Send se{enter}
$q::Send nw{enter}
$e::Send ne{enter}
$Space::Send a{enter}
$f::Send cure{enter}
#IF
- Today, 12:08
- Forum: Ask for Help (v1)
- Topic: Long press is not working Topic is solved
- Replies: 76
- Views: 2811
Re: Long press is not working Topic is solved
Maybe the definition of the commands and the initialization of the counter are not in the auto-execute section (at the beginning of the script)? Try: \::Send,% ["command 1", "command 2", "command 3" , "command 4", "command 5"][++BSL:=Mod(0 BSL, 5)] Explanation of: ++BSL:=Mod(0 BSL, 5) BSL is the cou...
- Today, 04:40
- Forum: Ask for Help (v1)
- Topic: How to magnify an area in the middle?
- Replies: 1
- Views: 157
Re: How to magnify an area in the middle?
Hallo, your Timer does not zoom the area under the magnification window but the magnification window itself. Marcgii had found a solution for the same problem himself using DllCall("user32.dll\SetWindowDisplayAffinity", UInt, hWnd, UInt,0x00000011) See https://www.autohotkey.com/boards/viewtopic.php...
- Yesterday, 01:51
- Forum: Gaming
- Topic: If the game shuts down, shut down OBS too
- Replies: 1
- Views: 142
Re: If the game shuts down, shut down OBS too
Hallo, start Wordpad, Notepad and this script: #Requires AutoHotkey v2.0 Persistent Timer := () => !WinExist("ahk_exe wordpad.exe") And WinExist("ahk_exe notepad.exe")?WinClose():"" SetTimer Timer, 1000 ; every second If you exit Wordpad, the script also exits Notepad. Replace Wordpad with your game...
- Yesterday, 01:24
- Forum: Ask for Help (v1)
- Topic: need help switching keybinds
- Replies: 1
- Views: 176
Re: need help switching keybinds
Hallo, I interpret this as follows: If you press LShift + d, your game should only see the pressed d. Try: #Warn #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. #SingleInstance Force ; Ensures only one instance of the script is running. SetBatchLines, -1 ; Set...
- Yesterday, 00:43
- Forum: Ask for Help (v1)
- Topic: Help executing/running a function
- Replies: 1
- Views: 194
Re: Help executing/running a function
Hallo, try: TeleportPosX = 1536 TeleportPosY = 39 TeleportSearchPosX = 1351 TeleportSearchPosY = 250 AreaToGoToX = 956 AreaToGoToY = 353 ^F1::GoToArea("Void Spiral", false) GoToArea(Area, AutoFarm) { Global ; <<<<<< MouseMove, TeleportPosX, TeleportPosY Click Click MouseMove, TeleportSearchPosX, Tel...
- 03 May 2024, 03:38
- Forum: Gaming Help (v1)
- Topic: Hypixel Skyblock farm
- Replies: 3
- Views: 315
Re: Hypixel Skyblock farm
Hallo, try: x := 2, y := 3, k := 5 q:: ; Start with Key Q Loop { Loop, 3 Hold("a", x), Hold("s", y), Hold("d", x) Sleep, 1000*k } Hold(Key, Seconds) { SendEvent, {%Key% Down} Sleep, Seconds*1000 SendEvent, {%Key% Up} } ; Hold(Key, Seconds) ; { ; with AutoRepeat ; SetKeyDelay, 30 ; Loop,% Seconds*100...
- 03 May 2024, 02:14
- Forum: Ask for Help (v1)
- Topic: Long press is not working Topic is solved
- Replies: 76
- Views: 2811
Re: Long press is not working Topic is solved
E.g.: q:: KeyWait,% Counter() ; counts every 500 ms Switch No { Case 1:MsgBox do first Task Case 2:MsgBox do second Task Case 3:MsgBox do third Task ; ... } Return !w:: KeyWait,% Counter(1000) ; counts every 1000 ms Switch No { Case 1:MsgBox do first Task Case 2:MsgBox do second Task Case 3:MsgBox d...
- 02 May 2024, 10:53
- Forum: Ask for Help (v1)
- Topic: Need help with a project
- Replies: 4
- Views: 345
Re: Need help with a project
Hallo,
use Arrays https://www.autohotkey.com/docs/v1/Objects.htm#Usage_Simple_Arrays
use Arrays https://www.autohotkey.com/docs/v1/Objects.htm#Usage_Simple_Arrays
Code: Select all
Text := {} ; Array
Text.Push("A example","B example","C example","D example","E example")
F2::
Random, randNum, 1, Text.Length()
SendInput,% Text[randNum]
Return
- 02 May 2024, 10:27
- Forum: Ask for Help (v2)
- Topic: nested functions with assume-global
- Replies: 3
- Views: 301
Re: nested functions with assume-global
Hallo, the "assume global" mode of inner2() apparently causes it to regard the inner1() function as a global variable. Try: #Requires AutoHotkey v2.0 #Warn All, Off outer(1) ListVars outer(x) { inner1(y) { global SoundBeep(4000, 20) iTest := 1 } inner2(z) { global SoundBeep(1000, 20) Try inner1(1) }...
- 02 May 2024, 00:22
- Forum: Ask for Help (v1)
- Topic: Toggle NumLock ScrollLock & CapsLock Issue
- Replies: 2
- Views: 295
Re: Toggle NumLock ScrollLock & CapsLock Issue
Hallo, GetKeyState has no “F” mode! Try: TOGGLE_CapsLock: If GetKeyState("CapsLock", "T") = 1 SetCapsLockState, Off Else If GetKeyState("CapsLock", "T") = 0 SetCapsLockState, On Return RETURN TOGGLE_NumLock: If GetKeyState("NumLock", "T") = 1 SetNumLockState, Off Else If GetKeyState("NumLock", "T") ...
- 02 May 2024, 00:00
- Forum: Gaming
- Topic: tap left shift and r to spam f
- Replies: 4
- Views: 387
Re: tap left shift and r to spam f
Then try:
Code: Select all
#Requires AutoHotkey v2.0
<+r:: { ; LShift & r
SetKeyDelay 50
While GetKeyState("r", "P") && GetKeyState("Lshift", "P")
SendEvent "{Blind}f"
}
- 01 May 2024, 03:01
- Forum: Gaming
- Topic: tap left shift and r to spam f
- Replies: 4
- Views: 387
Re: tap left shift and r to spam f
Hallo,
perhaps?:or?:
perhaps?:
Code: Select all
<+r::f
Code: Select all
#HotIf GetKeyState("LShift","P")
r::f
#HotIf
- 01 May 2024, 02:23
- Forum: Ask for Help (v1)
- Topic: Call a function whose name is stored in an associative array
- Replies: 4
- Views: 385
Re: Call a function whose name is stored in an associative array
Hallo.
Or, as this is the v1.1 and older forum:
Or, as this is the v1.1 and older forum:
Code: Select all
#Requires AutoHotkey v1.1.33
FuncNames := {MyFunc:"Func1", YourFunc:"Func2"}
FuncNames.MyFunc()
FuncNames.YourFunc()
; or
; FuncNames["MyFunc"]()
; FuncNames["YourFunc"]()
Func1() {
MsgBox This is function 1
}
Func2() {
MsgBox This is function 2
}
- 01 May 2024, 01:11
- Forum: Ask for Help (v1)
- Topic: Set before last window on top possible? Topic is solved
- Replies: 3
- Views: 313
Re: Set before last window on top possible? Topic is solved
Hallo, try: DllCall("RegisterShellHookWindow", "UInt", A_ScriptHwnd) OnMessage(DllCall("RegisterWindowMessage", "Str", "SHELLHOOK"), "WinActivated") Return q::WinActivate,% PreviousWin ; activates the previously active window WinActivated(wParam, lParam) { Global ActiveWin, PreviousWin If (wParam = ...
- 30 Apr 2024, 07:07
- Forum: Ask for Help (v1)
- Topic: Sendlevel and modifier key problem... Topic is solved
- Replies: 2
- Views: 242
Re: Sendlevel and modifier key problem... Topic is solved
Hallo,
try:
try:
Code: Select all
a::send {s down}{d down}
a up::send {s up}{d up}
shift::send {s down}{d down}
shift up::send {s up}{d up}
#InputLevel 1
w::send {a down} ; hotkey 1
w up::send {a up}
q::shift ;hotkey 2
#InputLevel 0
- 29 Apr 2024, 05:59
- Forum: Ask for Help (v2)
- Topic: Please test AHK v2 with Win11 and two monitors
- Replies: 4
- Views: 366
Re: Please test AHK v2 with Win11 and two monitors
Hallo, works! Test it yourself: #Requires AutoHotkey v2.0 #SingleInstance force ; skips the dialog box and replaces the old instance of the script automatically GroupAdd("Microsoft", "ahk_exe ONENOTE.EXE") ; Microsoft OneNote GroupAdd("Microsoft", "ahk_exe OUTLOOK.EXE") ; Microsoft Outlook GroupAdd(...
- 29 Apr 2024, 05:35
- Forum: Gaming Help (v1)
- Topic: Retrigger script if trigger key pressed again Topic is solved
- Replies: 2
- Views: 305
Re: Retrigger script if trigger key pressed again Topic is solved
Hallo,
try:
try:
Code: Select all
e::
Send, {m Down}
SetTimer, MTimer, -1000
Return
MTimer:
Send, {m Up}
Return
- 29 Apr 2024, 00:30
- Forum: Ask for Help (v2)
- Topic: Block input
- Replies: 4
- Views: 346
Re: Block input
You must not have done anything wrong. According to the manual, BlockInput On/Off sometimes does not work: https://www.autohotkey.com/docs/v1/lib/BlockInput.htm#Remarks https://www.autohotkey.com/docs/v2/lib/BlockInput.htm#Remarks Note: The OnOff and SendMouse modes might have no effect if UAC is en...