The script I currently have is this:
Code: Select all
x::
Send q
sleep 50
Send w
sleep 55
Send e
sleep 55
Send r
sleep 50
Send t
sleep 55
Send y
sleep 55
Send u
sleep 25
Send i
sleep 25
Send o
sleep 25
Send p
sleep 25
Send a
Return
Code: Select all
x::
Send q
sleep 50
Send w
sleep 55
Send e
sleep 55
Send r
sleep 50
Send t
sleep 55
Send y
sleep 55
Send u
sleep 25
Send i
sleep 25
Send o
sleep 25
Send p
sleep 25
Send a
Return
Code: Select all
#InstallKeybdHook
keys := []
keys.push({key:"q",delay:50})
keys.push({key:"w",delay:55})
keys.push({key:"e",delay:55})
keys.push({key:"r",delay:50})
keys.push({key:"t",delay:55})
keys.push({key:"y",delay:55})
keys.push({key:"u",delay:25})
keys.push({key:"i",delay:25})
keys.push({key:"o",delay:25})
keys.push({key:"p",delay:25})
return
x::
keywait,x ;wait to release x or it will stop early
lastIdle := A_TimeIdleKeyboard
for k,v in keys
{
send % v.key
sleep % v.delay
if (A_TimeIdleKeyboard < lastIdle) {
break
}
lastIdle := A_TimeIdleKeyboard
}
return
Code: Select all
#InstallKeybdHook
keys := []
keys.push({key:"q",delay:50})
keys.push({key:"w",delay:55})
keys.push({key:"e",delay:55})
keys.push({key:"r",delay:50})
keys.push({key:"t",delay:55})
keys.push({key:"y",delay:55})
keys.push({key:"u",delay:25})
keys.push({key:"i",delay:25})
keys.push({key:"o",delay:25})
keys.push({key:"p",delay:25})
keys.push({mouse:"left",delay:50}) ;this will click the mouse are current mouse position
keys.push({mouse:"left",x:200,y:200,delay:50}) ;this will click the mouse at 200,200
keys.push({mouse:"right",delay:500}) ;right click
return
x::
keywait,x ;wait to release x or it will stop early
lastIdle := A_TimeIdleKeyboard
for k,v in keys
{
if (v.mouse) { ;if this key event is a mouse event
mouseButton := v.mouse
if (v.x and v.y) {
x := v.x, y := v.y
click,%mouseButton%,%x%,%y% ;if this key event has x and y coordinates then use them
} else {
click,% mouseButton ;if it doesn't just click where the mouse is
}
} else {
send % v.key
}
sleep % v.delay
if (A_TimeIdleKeyboard < lastIdle) {
break
}
lastIdle := A_TimeIdleKeyboard
}
return
Code: Select all
#InstallKeybdHook
keys := []
keys.push({key:"1",delay:50})
keys.push({key:"q",delay:55})
keys.push({mouse:"left",delay:50})
keys.push({key:"2",delay:55})
keys.push({key:"w",delay:50})
keys.push({mouse:"left",delay:55})
keys.push({key:"3",delay:55})
keys.push({key:"e",delay:55})
keys.push({mouse:"left",delay:55})
keys.push({key:"4",delay:25})
keys.push({key:"r",delay:25})
keys.push({mouse:"left",delay:25})
keys.push({key:"5",delay:25})
keys.push({key:"t",delay:25})
keys.push({mouse:"left",delay:25})
keys.push({key:"6",delay:25})
keys.push({mouse:"right",delay:25})
keys.push({key:"y",delay:25})
keys.push({mouse:"left"})
return
x::
keywait,x ;wait to release x or it will stop early
lastIdle := A_TimeIdleKeyboard
for k,v in keys
{
if (v.mouse) { ;if this key event is a mouse event
mouseButton := v.mouse
if (v.x and v.y) {
x := v.x, y := v.y
click,%mouseButton%,%x%,%y% ;if this key event has x and y coordinates then use them
} else {
click,% mouseButton ;if it doesn't just click where the mouse is
}
} else {
send % v.key
}
sleep % v.delay
if (A_TimeIdleKeyboard < lastIdle) {
break
}
lastIdle := A_TimeIdleKeyboard
}
return
Code: Select all
y or u::
Send 1
sleep 55
click, , , right
sleep 50
Send {LShift down}{k}
Send {k}{LShift up}
sleep 55
Send 2
sleep 55
click, , , right
sleep 55
Send {LShift down}{k}
Send {k}{LShift up}
sleep 55
Send 3
sleep 55
click, , , right
sleep 55
Send {LShift down}{k}
Send {k}{LShift up}
sleep 55
Send 4
sleep 55
click, , , right
sleep 55
Send {LShift down}{k}
Send {k}{LShift up}
sleep 55
Send 5
sleep 55
click, , , right
sleep 55
Send {LShift down}{k}
Send {k}{LShift up}
sleep 55
Send 6
sleep 25
click, , , right
sleep 25
Send {LShift down}{k}
Send {k}{LShift up}
Return
Code: Select all
#InstallKeybdHook
macro1 := []
macro1.push({key:"1",delay:50})
macro1.push({key:"q",delay:55})
macro1.push({mouse:"left",delay:50})
macro1.push({key:"2",delay:55})
macro1.push({key:"w",delay:50})
macro1.push({mouse:"left",delay:55})
macro1.push({key:"3",delay:55})
macro1.push({key:"e",delay:55})
macro1.push({mouse:"left",delay:55})
macro1.push({key:"4",delay:25})
macro1.push({key:"r",delay:25})
macro1.push({mouse:"left",delay:25})
macro1.push({key:"5",delay:25})
macro1.push({key:"t",delay:25})
macro1.push({mouse:"left",delay:25})
macro1.push({key:"6",delay:25})
macro1.push({mouse:"right",delay:25})
macro1.push({key:"y",delay:25})
macro1.push({mouse:"left"})
macro2 := []
macro2.push({key:"1",delay:55})
macro2.push({mouse:"right",delay:50})
macro2.push({key:"{lshift down}kk{lshift up}",delay:55})
macro2.push({key:"2",delay:55})
macro2.push({mouse:"right",delay:55})
macro2.push({key:"{lshift down}kk{lshift up}",delay:55})
macro2.push({key:"3",delay:55})
macro2.push({mouse:"right",delay:50})
macro2.push({key:"{lshift down}kk{lshift up}",delay:55})
macro2.push({key:"4",delay:55})
macro2.push({mouse:"right",delay:55})
macro2.push({key:"{lshift down}kk{lshift up}",delay:55})
macro2.push({key:"5",delay:55})
macro2.push({mouse:"right",delay:55})
macro2.push({key:"{lshift down}kk{lshift up}",delay:55})
macro2.push({key:"6",delay:55})
macro2.push({mouse:"right",delay:25})
macro2.push({key:"{lshift down}kk{lshift up}",delay:55})
return
$x:: ;$ is necessary to prevent virtual keypresses to trigger the hotkeys
keywait,x
ProcessMacro(macro1)
return
$y::
$u::
keywait,y
keywait,u
ProcessMacro(macro2)
return
ProcessMacro(macro) { ;a custom function to process special macro arrays
static lastIdle
lastIdle := A_TimeIdleKeyboard
for k,v in macro
{
if (v.mouse) { ;if this key event is a mouse event
mouseButton := v.mouse
if (v.x and v.y) {
x := v.x, y := v.y
click,%mouseButton%,%x%,%y% ;if this key event has x and y coordinates then use them
} else {
click,% mouseButton ;if it doesn't just click where the mouse is
}
} else {
send % v.key
}
sleep % v.delay
if (A_TimeIdleKeyboard < lastIdle) {
break
}
lastIdle := A_TimeIdleKeyboard
}
return
}