Search found 7645 matches
- Today, 08:01
- Forum: Ask for Help (v1)
- Topic: Long press is not working Topic is solved
- Replies: 60
- Views: 1101
Re: Long press is not working Topic is solved
No problem here with US, GB and DE keyboard. Actually, the script should only react to modifier variations of the 1 key. Which keyboard layout are you using?: ; Hotkey F4 shows the keyboard scheme valid for the active window. ; The url calculation may not fit everywhere! Lang := {0x4090409:"United S...
- Today, 02:03
- Forum: Ask for Help (v2)
- Topic: play sounds like old typewriter
- Replies: 4
- Views: 112
Re: play sounds like old typewriter
it generates many Key-down and one Key-up this is because auto-repeat . See: https://www.autohotkey.com/docs/v2/lib/Send.htm#Repeating_or_Holding_Down_a_Key It shows how to imitate this behaviour When a key is held down via the method above, it does not begin auto-repeating like it would if you wer...
- Yesterday, 03:37
- Forum: Ask for Help (v1)
- Topic: WinGet ProcessName doesn't work?
- Replies: 3
- Views: 61
Re: WinGet ProcessName doesn't work?
By default, User Account Control (UAC) protects "elevated" programs (that is, programs which are running as admin) from being automated by non-elevated programs, since that would allow them to bypass security restrictions. Hotkeys are also blocked, so for instance, a non-elevated program cannot spy...
- Yesterday, 03:04
- Forum: Ask for Help (v2)
- Topic: play sounds like old typewriter
- Replies: 4
- Views: 112
Re: play sounds like old typewriter
Hallo, something like this?: #SingleInstance Force #Requires AutoHotkey v2.- TraySetIcon "Shell32.dll", 174 ih := InputHook("VL0") ih.KeyOpt("{All}", "N") ih.OnKeyDown := OnKeyDown ih.OnKeyUp := OnKeyUp ih.VisibleText := True ih.MinSendLevel := 100 ih.Start() OnKeyDown(ih, vk, sc) { SoundPlay A_WinD...
- Yesterday, 02:25
- Forum: Spiele
- Topic: Wenn {w down} dann sollte Space die Alt-Taste sein
- Replies: 6
- Views: 130
Re: Wenn {w down} dann sollte Space die Alt-Taste sein
Kommt darauf an, wo im Skript dies steht! So, sollte es eigentlich funktionieren: #SingleInstance, Force SetKeyDelay, 0, 50 SetTitleMatchMode, 2 Menu, tray, Icon, e:\Games\Fallout 4\Fallout4.exe IfWinNotExist, Fallout4 Run, e:\Games\Fallout 4\Fallout 4.lnk WinWait, Fallout4 WinWaitClose, Fallout4 Ex...
- Yesterday, 01:59
- Forum: Ask for Help (v1)
- Topic: Long press is not working Topic is solved
- Replies: 60
- Views: 1101
Re: Long press is not working Topic is solved
Either $*1:: keywait, 1, T0.5 or $*1:: Switch, Morse() ! Both methods record your tapping of key 1. If both are arranged one after the other, the second method can no longer record anything, as you have already stopped tapping. Since Morse() is "more intelligent": #IFWinExist, ahk_exe notepad.exe $...
- 21 Apr 2024, 07:51
- Forum: Ask for Help (v1)
- Topic: suspend "screen off", or "sleep computer" problem
- Replies: 4
- Views: 83
Re: suspend "screen off", or "sleep computer" problem
Firstly, to capture the correct "numbers" after "SendMessage", where should one look? Additionally, I assume you run the script for a very short time, as the keys q and w (your shortcuts) are typically needed for other inputs. where should one look? Well, for professional programmers there are site...
- 21 Apr 2024, 03:03
- Forum: Ask for Help (v1)
- Topic: suspend "screen off", or "sleep computer" problem
- Replies: 4
- Views: 83
Re: suspend "screen off", or "sleep computer" problem
I have deactivated "sleep computer" and "hibernate computer". When I don't need my monitors, my script uses: q::SendMessage, 0x112, 0xF170, 2,, Program Manager ; monitors off w::SendMessage, 0x112, 0xF170, -1,, Program Manager ; monitors on Be patient! Switching the monitors off works quickly here, ...
- 20 Apr 2024, 13:30
- Forum: Ask for Help (v1)
- Topic: Long press is not working Topic is solved
- Replies: 60
- Views: 1101
Re: Long press is not working Topic is solved
Then try: #IFWinExist, ahk_exe notepad.exe $*d:: keywait, d, T0.5 if errorlevel { ; long press SoundBeep WinActivate ; activates ahk_exe notepad.exe WinWaitActive SendTimer(1, " ( LTrim Join C {100} ; Sleep 100 ms {Ctrl Down}{m}{Ctrl Up} ; ^m {1500} ; Sleep 1500 ms {Ctrl Down}{Shift Down}{v}{Shift U...
- 20 Apr 2024, 12:34
- Forum: Ask for Help (v1)
- Topic: Long press is not working Topic is solved
- Replies: 60
- Views: 1101
Re: Long press is not working Topic is solved
Try: #IFWinExist, ahk_exe notepad.exe $*d:: keywait, d, T0.5 if errorlevel { ; = long press SoundBeep WinActivate ; activate ahk_exe notepad.exe WinWaitActive Send Hello ; or SendTimer(... } else Send d ; short press keywait, d Return After a short press of d, a "d" is sent to the currently active w...
- 20 Apr 2024, 10:47
- Forum: Ask for Help (v1)
- Topic: Long press is not working Topic is solved
- Replies: 60
- Views: 1101
Re: Long press is not working Topic is solved
Everything right, except: The keywait, d, T0.5 command tells the script to wait for the "d" key to be released, with a timeout of 0.5 seconds The if errorlevel statement checks if there was an error during the keywait command, which would happen if the "d" key was not released within the 0.5-second ...
- 20 Apr 2024, 10:05
- Forum: Gaming Help (v1)
- Topic: Stop the script from using Ctrl, Shift or Alt.
- Replies: 1
- Views: 24
Re: Stop the script from using Ctrl, Shift or Alt.
Hallo, perhaps?: f9:: Loop { ; IfWinExist, ahk_class LWJGL Loop { ControlSend,, {Blind}{%Place% down}, ahk_class LWJGL Sleep(10) ControlSend,, {Blind}{1 up}, ahk_class LWJGL Sleep(500) ControlSend,, {Blind}{d down}, ahk_class LWJGL Sleep(100) ControlSend,, {Blind}{d up}, ahk_class LWJGL Sleep(500) C...
- 20 Apr 2024, 04:10
- Forum: Gaming Help (v1)
- Topic: Toggle 3 keys
- Replies: 1
- Views: 40
Re: Toggle 3 keys
Hallo,
perhaps?:
the tilde ~ activates the keyboard hook just like $
https://www.autohotkey.com/docs/v1/Hotkeys.htm#Tilde
perhaps?:
Code: Select all
s::Send,% ++N:=Mod(0 N, 3) ; sends 1-3 cyclic
~1::N=1 ; Key 1 performs its native function and sets N to 1
https://www.autohotkey.com/docs/v1/Hotkeys.htm#Tilde
- 20 Apr 2024, 02:14
- Forum: Ask for Help (v1)
- Topic: Setting hotstrings to only work after a key is pressed Topic is solved
- Replies: 2
- Views: 105
Re: Setting hotstrings to only work after a key is pressed Topic is solved
Hallo, try: /:: toggle = 1 ToolTip "on" Return #IF toggle Enter:: toggle = 0 ToolTip "off" Return :*:g1::Greetings{!} How can I be of assistance today? :*:y1::Certainly, the yellow line will lead you to where you need to be. Good luck! :*:r1::Certainly, the red line will lead you you to what you are...
- 20 Apr 2024, 01:57
- Forum: Spiele
- Topic: Wenn {w down} dann sollte Space die Alt-Taste sein
- Replies: 6
- Views: 130
Re: Wenn {w down} dann sollte Space die Alt-Taste sein
Mangels Fallout (Tschernobyl ist schon eine Weile her) habe ich mit einer im Editor geöffneten Fallout4.txt getestet: #SingleInstance, Force SetKeyDelay, 0, 50 SetTitleMatchMode, 2 ; Menu, tray, Icon, e:\Games\Fallout 4\Fallout4.exe IfWinNotExist, Fallout4 Run, e:\Games\Fallout 4\Fallout 4.lnk #IF G...
- 19 Apr 2024, 09:50
- Forum: Ask for Help (v1)
- Topic: Long press is not working Topic is solved
- Replies: 60
- Views: 1101
Re: Long press is not working Topic is solved
Did you not see my comments?
; As soon as the start window is no longer active,
; the SendTimer is deactivated
To end the SendTimer, all you had to do was activate another window.
; As soon as the start window is no longer active,
; the SendTimer is deactivated
To end the SendTimer, all you had to do was activate another window.
- 19 Apr 2024, 09:30
- Forum: Spiele
- Topic: Wenn {w down} dann sollte Space die Alt-Taste sein
- Replies: 6
- Views: 130
Re: Wenn {w down} dann sollte Space die Alt-Taste sein
Hallo, nur diese Anforderung: "Es wäre schön wenn ich die w-Taste gedrückt habe und nur dann die Space -Taste die Funktion der Alt-Taste, aber auch nur dann sobald ich (w up) wieder aktiviere soll Space auch wieder Space sein.": #IF GetKeyState("w","P") ; wenn ich die w-Taste gedrückt habe #InputLev...
- 19 Apr 2024, 07:33
- Forum: Ask for Help (v1)
- Topic: Long press is not working Topic is solved
- Replies: 60
- Views: 1101
Re: Long press is not working Topic is solved
See https://www.autohotkey.com/docs/v1/lib/_IfWinActive.htm This directive is called "#IfWinActive,..." not "#If MouseOver(Win)"! #IfWinActive is only interested in which window is active and not which window the cursor is currently over. #IF MouseOver("ahk_class Notepad") LButton::SoundBeep ; beeps...
- 19 Apr 2024, 01:35
- Forum: Ask for Help (v2)
- Topic: Can the Gui's close button be disabled Topic is solved
- Replies: 6
- Views: 166
Re: Can the Gui's close button be disabled Topic is solved
Hallo,
try:
"Min": 0xF020
"Max": 0xF030
"Close": 0xF060
try:
Code: Select all
#Requires AutoHotkey v2.0
MyGui := Gui()
DllCall("user32\DeleteMenu", "UInt", DllCall("user32\GetSystemMenu"
, "UInt", MyGui.Hwnd, "UInt", False), "UInt", 0xF060, "UInt", 0)
MyGui.Show("w200 h50")
"Max": 0xF030
"Close": 0xF060
- 19 Apr 2024, 00:42
- Forum: Gaming Help (v1)
- Topic: Macro F4 to F1
- Replies: 2
- Views: 58
Re: Macro F4 to F1
Hallo, try: q::Send,% "{F" (++M:=Mod((!M M)+2, 4)) "}" ; F4 to F1 cyclic w::Send,% "{F" (++P:=Mod(0 P, 4)) "}" ; F1 to F4 cyclic To test this method: ; Separate counters M, P (M=Minus, P=Plus) F1::ToolTip,% "M = " ++M:=Mod((!M M)+2, 4) ; 4 to 1 cyclic F2::ToolTip,% "P = " ++P:=Mod(0 P, 4) ; 1 - 4 cy...