Código: Seleccionar todo
Opt("PixelCoordMode",2)
Opt("MouseCoordMode",2)
WinWaitActive("nombre de ventana");creo que es aqui donde tengo el problema ya que solo me funciona cuando la ventana la tengo activa y a mi me interesa que este script funcione con la ventana minimizada.
Global $Paused, $counter = 0
HotKeySet("{PAUSE}", "TogglePause")
Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(0)
ToolTip('pulsa pausa para modo pausa = pausa para activar nuevamente "',0,0)
WEnd
ToolTip("")
EndFunc
HotKeySet ("{ESC}","Quit")
Func Quit()
Exit
EndFunc
$Control = 0x3E1616
$Target = "0x5B9600"
$Target2 = "0xC4C1C4"
$Target3 = 0x0089AA
$Target4 = "0xD7A700"
$Click = "Right"
$Su = 50
$In = 150
$Iz = 680
$De = 430
While 1
$counter +=1
ToolTip ("ejecucion activa",0,0)
$SearchResult = PixelSearch(401,26,402,27,$Control,5,1)
If @error Then
MouseClick("Right")
Sleep(100)
EndIf
$SearchResult = PixelSearch(401,26,402,27,$Control,5,1)
If @error Then
$coord = PixelSearch($Su,$In,$Iz,$De,$Target,5,1)
If @error Then
Else
$x = Random($coord[0], $coord[0]+50)
$y = Random($coord[1], $coord[1]+50)
MouseClick("Right", $x, $y, 2, 0)
Send("{F1}")
EndIf
Else
Send("{F4}")
EndIf
$SearchResult = PixelSearch(401,26,402,27,$Control,5,1)
If @error Then
MouseClick("Right")
Sleep(100)
EndIf
$SearchResult = PixelSearch(401,26,402,27,$Control,5,1)
If @error Then
$coord = PixelSearch($Su,$In,$Iz,$De,$Target2,5,1)
If @error Then
Else
$x = Random($coord[0], $coord[0]+50)
$y = Random($coord[1], $coord[1]+50)
MouseClick("Right", $x, $y, 2, 0)
Send("{F1}")
EndIf
Else
Send("{F4}")
EndIf
$SearchResult = PixelSearch(401,26,402,27,$Control,5,1)
If @error Then
MouseClick("Right")
Sleep(100)
EndIf
$SearchResult = PixelSearch(401,26,402,27,$Control,5,1)
If @error Then
$coord = PixelSearch($Su,$In,$Iz,$De,$Target3,5,1)
If @error Then
Else
$x = Random($coord[0], $coord[0]+50)
$y = Random($coord[1], $coord[1]+50)
MouseClick("Right", $x, $y, 2, 0)
Send("{F1}")
EndIf
Else
Send("{F4}")
EndIf
$SearchResult = PixelSearch(401,26,402,27,$Control,5,1)
If @error Then
MouseClick("Right")
Sleep(100)
EndIf
$SearchResult = PixelSearch(401,26,402,27,$Control,5,1)
If @error Then
$coord = PixelSearch($Su,$In,$Iz,$De,$Target4,5,1)
If @error Then
Else
$x = Random($coord[0], $coord[0]+50)
$y = Random($coord[1], $coord[1]+50)
MouseClick("Right", $x, $y, 2, 0)
Send("{F1}")
EndIf
Else
Send("{F4}")
EndIf
$SearchResult = PixelSearch(401,26,402,27,$Control,5,1)
If @error Then
MouseClick("Right")
Sleep(100)
EndIf
WEnd