Code: Select all
#MaxThreadsPerHotkey 6
$w::{
KeyWait 'w'
if KeyWait('w', 'D T0.1') {
MsgBox '2'
}
else {
MsgBox '1'
}
}
Code: Select all
#MaxThreadsPerHotkey 6
$w::{
KeyWait 'w'
if KeyWait('w', 'D T0.1') {
MsgBox '2'
}
else {
MsgBox '1'
}
}
Code: Select all
#MaxThreadsPerHotkey 6
w::{
MsgBox '1'
}
+w::{
MsgBox '2'
}
Code: Select all
#MaxThreadsPerHotkey 2
w::{
MsgBox '1'
}
+w::{
MsgBox '2'
}
Code: Select all
#MaxThreadsPerHotkey 1
w::{
KeyWait 'w'
if KeyWait('w', 'D T0.1') {
MsgBox '2'
}
else {
MsgBox '1'
}
}
Code: Select all
#MaxThreadsPerHotkey 2
w::{
KeyWait 'w'
if KeyWait('w', 'D T0.1') {
MsgBox '2'
}
else {
MsgBox '1'
}
}
Code: Select all
#Requires AutoHotkey v2.0
w:: {
Static presses := 0
presses++
SetTimer go, -300
go() {
Switch presses {
Case 1: Send 1
Case 2: makeGUI
}
presses := 0
}
}
makeGUI() {
g := Gui('+AlwaysOnTop')
g.AddText 'w300', 'abc'
g.Show 'NoActivate x' Random(1, 800) ' y' Random(1, 800)
}
Code: Select all
#MaxThreadsPerHotkey 6
w::{
Title := WinGetTitle()
OnError((*) => 1)
SetTimer () => WinSetAlwaysOnTop(1, 'ahk_class #32770'), -50
if 'OK' = (Input := InputBox('Input something:', Title, 'w330 h129')).Result {
WinActivate Title
WinWaitActive Title
SetKeyDelay 20, 20
SendEvent '123{Enter}'
Sleep 100
SendEvent Input
}
}
+w::{
Basically the same, but with different string stored in Input and different SendEvents. Want to double press W instead of Shift+W.
}