Post by A_AhkUser » 05 Jan 2018, 22:18
Hola
Artel,
Artel wrote:Quiero que cuando aprete ALT se mantenga apretada y cuando la aprete de nuevo se desactive
Code: Select all
ceroOrUno := 0
OnExit, alSalir
return
Alt::send % "{Alt " . ((ceroOrUno:=(ceroOrUno = 1) ? 0 : 1) ? "Down" : "Up") . "}"
alSalir:
send, {Alt Up} ; suelta ALt al salir del programa
ExitApp
documentación:
Saludos.
Hola [color=#0080BF]Artel[/color],
[quote="Artel"]Quiero que cuando aprete ALT se mantenga apretada y cuando la aprete de nuevo se desactive[/quote]
[code]ceroOrUno := 0
OnExit, alSalir
return
Alt::send % "{Alt " . ((ceroOrUno:=(ceroOrUno = 1) ? 0 : 1) ? "Down" : "Up") . "}"
alSalir:
send, {Alt Up} ; suelta ALt al salir del programa
ExitApp[/code]
documentación:
[indent=2]-[url=https://www.autohotkey.com/docs/Variables.htm#ternary]ternary operator[/url][/indent]
[indent=2]-[url=https://www.autohotkey.com/docs/commands/OnExit.htm]OnExit[/url][/indent]
Saludos.