Page 1 of 1

ayudaa para un juego

Posted: 23 Jan 2018, 03:09
by rodrigo
soi nuevo con el programa alguien me puede ayudar a crear un script para un juego en el qe repita estas teclas 1,2,3,4,5,6,7,8,9 y 0 que al apretar una de ellas se repita 10 veces graciias

Re: ayudaa para un juego

Posted: 23 Jan 2018, 14:08
by A_AhkUser
Hola,

Prueba eso:

Code: Select all

#NoEnv
#SingleInstance force
SetWorkingDir % A_ScriptDir
SendMode, Input
CoordMode, ToolTip, Screen
#Warn
; Windows 8.1 64 bit - Autohotkey v1.1.27.04 32-bit Unicode


; SetKeyDelay, 0, 50 ; >>> https://www.autohotkey.com/docs/FAQ.htm#games

i := -1
Hotkey, IfWinActive, ahk_class Notepad ; sustitue 'ahk_class Notepad' por un titulo que permite a ahk identificar la ventana de tu juego (>>> https://www.autohotkey.com/docs/misc/WinTitle.htm)
Loop, 10
	Hotkey % ++i, subrutina, on
return


subrutina:
Loop, 10 {
	Send % "{" . A_ThisHotkey . " Down}"
	; sleep, 10 ; >>> https://www.autohotkey.com/docs/FAQ.htm#games
	Send % "{" . A_ThisHotkey . " Up}"
}
return