Flipeador wrote:Hola, no utilices
GetKeyState. Intenta implementar esta lógica en tu Script:
Code: Select all
F1::
estado := TRUE
While (estado)
{
Sleep 500
SendInput a
}
Return
F2:: estado := FALSE
El script es solo para que veas como se hace, si presionas
F1 inicia y con
F2 para. En lugar de utilizar
GetKeyState utilizas una variable como "interruptor".
Ahora tengo un problema muy extraño, el codigo funciona bien pero cuando lo implemento a mis otros macros funciona bien pero en ocaciones cuando uso lo uso en conjunto con otros macros deja de funcionar como deberia, este es el conjunto de macros que uso:
*q::
state:=False
if(firstSlot := !firstSlot){
Send {3}
}
else{
Send {6}
}
loop {
if((GetKeyState("1", "P")) or (GetKeyState("2", "P")) or (GetKeyState("3", "P")) or (GetKeyState("4", "P")) or (GetKeyState("5", "P")) or (GetKeyState("6", "P")) or (GetKeyState("f", "P")) or (GetKeyState("c", "P")) or (GetKeyState("v", "P")) or (GetKeyState("|", "P")) or (GetKeyState("x", "P")) or (GetKeyState("t", "P")) or (GetKeyState("g", "P"))= 1) {
return
}
if(GetKeyState("LButton", "P") = 1) {
if(firstSlot){
sleep, 25
Send {9}
}
else{
sleep, 25
Send {1}
}
firstSlot := !firstSlot
KeyWait, LButton, L
}
}
~*1::
state := true
while(state){
if(GetKeyState("LButton", "P") = 1){
sleep, 150
send {K}
sleep, 1325
}
}
~*2:: state:=False
~*3:: state:=False
~*4:: state:=False
~*5:: state:=False
~*6:: state:=False
~*f:: state:=False
~*c:: state:=False
~*v:: state:=False
~*t:: state:=False
~*g:: state:=False
~*ALT:: state:=False
return