Post by Flipeador » 11 Nov 2017, 09:53
Hola, prueba este script:
nota: es para la versión 2. para la versión 1 te lo dejo abajo de este.
Code: Select all
q::
str := 'a'
;ToolTip('a')
SetTimer('snd', 250)
KeyWait('q', 't0.2')
If (!ErrorLevel)
{
KeyWait('q', 'D t0.2')
If (!ErrorLevel)
{
SetTimer('snd', 250)
str := 's'
;ToolTip('s')
KeyWait('q', 't0.2')
If (!ErrorLevel)
{
KeyWait('q', 'D t0.2')
If (!ErrorLevel)
{
SetTimer('snd', 250)
str := 'd'
;ToolTip('d')
KeyWait('q', 't0.2')
If (!ErrorLevel)
{
KeyWait('q', 'D t0.2')
If (!ErrorLevel)
{
SetTimer('snd', 250)
str := 'z'
;ToolTip('z')
KeyWait('q', 't0.2')
If (!ErrorLevel)
{
KeyWait('q', 'D t0.2')
If (!ErrorLevel)
{
SetTimer('snd', 250)
str := 'x'
;ToolTip('x')
}
}
}
}
}
}
}
}
return
snd:
SetTimer('snd', 'Off')
SendInput(str)
Return
AHKV1:
(sin probar, no uso la versión 1)
Code: Select all
q::
str := "a"
ToolTip a
SetTimer snd, 250
KeyWait q, t0.2
If (!ErrorLevel)
{
KeyWait q, D t0.2
If (!ErrorLevel)
{
SetTimer snd, 250
str := "s"
;ToolTip s
KeyWait q, t0.2
If (!ErrorLevel)
{
KeyWait q, D t0.2
If (!ErrorLevel)
{
SetTimer snd, 250
str := "d"
;ToolTip d
KeyWait q, t0.2
If (!ErrorLevel)
{
KeyWait q, D t0.2
If (!ErrorLevel)
{
SetTimer snd, 250
str := "z"
;ToolTip z
KeyWait q, t0.2
If (!ErrorLevel)
{
KeyWait q, D t0.2
If (!ErrorLevel)
{
SetTimer snd, 250
str := "x"
;ToolTip x
}
}
}
}
}
}
}
}
return
snd:
SetTimer snd, Off
SendInput % str
Return
Tal vez se pueda optimizar... usando una variable como contador y evitando tanta repetición de código...
[font=Segoe UI]Hola, prueba este [i]script[/i]:
[color=#008000]nota:[/color] es para la versión 2. para la versión 1 te lo dejo abajo de este.[/font]
[code=autohotkey file=Untitled.ahk]q::
str := 'a'
;ToolTip('a')
SetTimer('snd', 250)
KeyWait('q', 't0.2')
If (!ErrorLevel)
{
KeyWait('q', 'D t0.2')
If (!ErrorLevel)
{
SetTimer('snd', 250)
str := 's'
;ToolTip('s')
KeyWait('q', 't0.2')
If (!ErrorLevel)
{
KeyWait('q', 'D t0.2')
If (!ErrorLevel)
{
SetTimer('snd', 250)
str := 'd'
;ToolTip('d')
KeyWait('q', 't0.2')
If (!ErrorLevel)
{
KeyWait('q', 'D t0.2')
If (!ErrorLevel)
{
SetTimer('snd', 250)
str := 'z'
;ToolTip('z')
KeyWait('q', 't0.2')
If (!ErrorLevel)
{
KeyWait('q', 'D t0.2')
If (!ErrorLevel)
{
SetTimer('snd', 250)
str := 'x'
;ToolTip('x')
}
}
}
}
}
}
}
}
return
snd:
SetTimer('snd', 'Off')
SendInput(str)
Return[/code]
[b]AHKV1:[/b]
[color=#008000](sin probar, no uso la versión 1)[/color]
[code=autohotkey file=Untitled.ahk]q::
str := "a"
ToolTip a
SetTimer snd, 250
KeyWait q, t0.2
If (!ErrorLevel)
{
KeyWait q, D t0.2
If (!ErrorLevel)
{
SetTimer snd, 250
str := "s"
;ToolTip s
KeyWait q, t0.2
If (!ErrorLevel)
{
KeyWait q, D t0.2
If (!ErrorLevel)
{
SetTimer snd, 250
str := "d"
;ToolTip d
KeyWait q, t0.2
If (!ErrorLevel)
{
KeyWait q, D t0.2
If (!ErrorLevel)
{
SetTimer snd, 250
str := "z"
;ToolTip z
KeyWait q, t0.2
If (!ErrorLevel)
{
KeyWait q, D t0.2
If (!ErrorLevel)
{
SetTimer snd, 250
str := "x"
;ToolTip x
}
}
}
}
}
}
}
}
return
snd:
SetTimer snd, Off
SendInput % str
Return[/code]
[hr][/hr]
Tal vez se pueda optimizar... usando una variable como contador y evitando tanta repetición de código... :think: