This code works fine when i dont use "blockinput" but when i use it, the script hang up and it seems it is in a loop and i cannot exit. It appears as if the keys was pressed continuosly.
How can i do to use "blockinput" and that it works fine with "onevent". The same code without onevent works fine. Please help, i have already tried all what is my hand.
The code is to online poker soft. Thank you.
Code: Select all
Let>tclick=0.05
//Dimesiones base de la ventana
Let>defX=808
Let>defY=627
//Boton All-in
Let>pos9x=740
Let>pos9y=510
//Boton Bajar apuesta (-)
Let>pos10x=560
Let>pos10y=529
//Punto vacio
Let>pos11x=660
Let>pos11y=470
//Boton derecho
Let>pos12x=704
Let>pos12y=560
OnEvent>KEY_DOWN,a,3,allin
Label>loop
Wait>0.01
goto>loop
SRT>allin
//blocking>1 ---HERE IS THE PROBLEM---
GetCursorPos>iniX,iniY
GetActiveWindow>handle,,,sizeX,sizeY
Let>pro9x={round(%pos9x%*(%sizeX%/%defX%))}
Let>pro9y={round(%pos9y%*(%sizeY%/%defY%))}
Let>pro10x={round(%pos10x%*(%sizeX%/%defX%))}
Let>pro10y={round(%pos10y%*(%sizeY%/%defY%))}
Let>pro12x={round(%pos12x%*(%sizeX%/%defX%))}
Let>pro12y={round(%pos12y%*(%sizeY%/%defY%))}
gosub>click,pro9x,pro9y,tclick
gosub>click,pro10x,pro10y,tclick
gosub>click,pro12x,pro12y,tclick
MouseMove>iniX,iniY
blockinput>0
END>allin
SRT>click
MouseMoveRel>click_var_1,click_var_2
WaitCursorChanged>0.05
LDown
Wait>click_var_3
LUp
Wait>click_var_3
END>click