Search found 7669 matches
- Today, 03:38
- Forum: Gaming Help (v1)
- Topic: Hypixel Skyblock farm
- Replies: 3
- Views: 264
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...
- Today, 02:14
- Forum: Ask for Help (v1)
- Topic: Long press is not working Topic is solved
- Replies: 72
- Views: 2528
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...
- Yesterday, 10:53
- Forum: Ask for Help (v1)
- Topic: Need help with a project
- Replies: 4
- Views: 270
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
- Yesterday, 10:27
- Forum: Ask for Help (v2)
- Topic: nested functions with assume-global
- Replies: 3
- Views: 275
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) }...
- Yesterday, 00:22
- Forum: Ask for Help (v1)
- Topic: Toggle NumLock ScrollLock & CapsLock Issue
- Replies: 2
- Views: 228
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") ...
- Yesterday, 00:00
- Forum: Gaming
- Topic: tap left shift and r to spam f
- Replies: 4
- Views: 347
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: 347
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: 348
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: 265
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: 208
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: 351
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: 279
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: 339
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...
- 28 Apr 2024, 10:24
- Forum: Gaming
- Topic: Change left clicks to right clicks at screen border
- Replies: 6
- Views: 310
Re: Change left clicks to right clicks at screen border
Perhaps?: #Requires AutoHotkey v2.0 SetTimer TEdge, 200 #HotIf Edge LButton::RButton #HotIf TEdge() { Global Edge InstallMouseHook() CoordMode("Mouse", "Screen"), MouseGetPos(&posX, &posY) IF (!Edge := posX < 5 or posY < 5 or posX > 3835 or posY > 2155) And GetKeyState("RButton") And !GetKeyState("R...
- 27 Apr 2024, 09:02
- Forum: Gaming
- Topic: Change left clicks to right clicks at screen border
- Replies: 6
- Views: 310
Re: Change left clicks to right clicks at screen border
Then perhaps?:
Code: Select all
#Requires AutoHotkey v2.0
SetTimer TEdge, 200
~*LButton Up::Click("Up Right")
#HotIf Edge
*LButton::Click("Down Right")
#HotIf
TEdge() {
Global Edge
CoordMode("Mouse", "Screen"), MouseGetPos(&posX, &posY)
Edge := posX < 5 or posY < 5 or posX > 3835 or posY > 2155
}
- 26 Apr 2024, 10:31
- Forum: Gaming
- Topic: Change left clicks to right clicks at screen border
- Replies: 6
- Views: 310
Re: Change left clicks to right clicks at screen border
Hallo,
try:
try:
Code: Select all
#Requires AutoHotkey v2.0
SetTimer TEdge, 200
#HotIf Edge
LButton::RButton
#HotIf
TEdge() {
Global Edge
CoordMode("Mouse", "Screen"), MouseGetPos(&posX, &posY)
Edge := posX < 5 or posY < 5 or posX > 3835 or posY > 2155
}
- 26 Apr 2024, 02:16
- Forum: Ask for Help (v2)
- Topic: Block input
- Replies: 4
- Views: 339
Re: Block input
Hallo,
try (not tested with MMO mouse):or:Such a big mouse with 12 side keys should better be called a rat.
try (not tested with MMO mouse):
Code: Select all
#Requires AutoHotkey v1.1.33
+F23 Up::BlockInput,% (Block:=!Block)?"On":"Off"
Code: Select all
#Requires AutoHotkey v2.0
+F23 Up:: {
Static Block := False
BlockInput (Block:=!Block)
}
- 26 Apr 2024, 01:58
- Forum: Ask for Help (v2)
- Topic: Shortcut to Defender Real-Time protection dialog?
- Replies: 3
- Views: 312
Re: Shortcut to Defender Real-Time protection dialog?
Hallo,
try (only tested with Windows 10):
https://www.autohotkey.com/docs/v2/misc/CLSID-List.htm
try (only tested with Windows 10):
Code: Select all
#Requires AutoHotkey v2.0
q::Run "shell:::{4026492F-2F69-46B8-B9BF-5654FC07E423}"
- 26 Apr 2024, 01:43
- Forum: Gaming Help (v1)
- Topic: i need help about my macro
- Replies: 1
- Views: 183
- 26 Apr 2024, 01:05
- Forum: Ask for Help (v1)
- Topic: Get inputhook to trap function keys
- Replies: 2
- Views: 316
Re: Get inputhook to trap function keys
Hallo, see https://www.autohotkey.com/docs/v1/lib/InputHook.htm#VisibleNonText Controls whether keys or key combinations which do not produce text are visible (not blocked) . CurrentSetting is NewSetting if assigned, otherwise 1 (true) by default . The V option sets this to 1 (true). Just set to fal...