i.m using this one from page 4 ,
This is only 2 skills from the game.
And that pictures when the application is running . There is without finding the image pressing all the time the keys.and i select only 2 if i select all of them it's going to send all the keys 1 by 1.
So in this game i have more tabs with skills so i do something like _Waitforimagesearch with an array of pictures. then automatically pressing the button when the program found it.But how u see the program it's sending the keys all the time without founding the img.
And normally when i attack some monsters in the game with one skill he have a cooldown with little bit of dark brightness and the application romally should not find the image and move to the next if (next image) if i.m correct. This is the script from the application.
#include <Color.au3>
#include <ImageSearch2015.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include <MsgBoxConstants.au3>
#include <GUIConstants.au3>
;//global pictures
Global $pictures[9]
$pictures[0] = 8
$pictures[1] = "skil1.png"
$pictures[2] = "skil2.png"
$pictures[3] = "skil3.png"
$pictures[4] = "skil4.png"
$pictures[5] = "skil5.png"
$pictures[6] = "skil6.png"
$pictures[7] = "skil7.png"
$pictures[8] = "skil8.png"
$Checkbox_1 = GUICtrlCreateCheckbox("Skill 4", 20, 40, 150, 20)
$Checkbox_2 = GUICtrlCreateCheckbox("Skill 5", 20, 60, 150, 20)
$Checkbox_3 = GUICtrlCreateCheckbox("Skill 6", 20, 80, 150, 20)
$Checkbox_4 = GUICtrlCreateCheckbox("Skill 7", 20, 100, 150, 20)
$Checkbox_5 = GUICtrlCreateCheckbox("Skill 8", 20, 120, 150, 20)
$Checkbox_6 = GUICtrlCreateCheckbox("Skill 9", 20, 140, 150, 20)
$Checkbox_7 = GUICtrlCreateCheckbox("Skill 0", 20, 160, 150, 20)
$Checkbox_8 = GUICtrlCreateCheckbox("Skill -", 20, 180, 150, 20)
$Checkbox_9 = GUICtrlCreateCheckbox("Skill +", 20, 200, 150, 20)
GUISetState()
While 1
Sleep( 10 )
WEnd
Exit
Func _Start ()
$ClickIt = 1
While $ClickIt = 1
If BitAND(GUICtrlRead($Checkbox_1), $GUI_CHECKED) = $GUI_CHECKED Then
$result = _WaitForImagesSearch($pictures, $waitTime, 0, $x, $y, 0, 0)
if $result > 0 Then
Send("4")
Sleep(100)
Else
ToolTip("")
EndIf
EndIf
If BitAND(GUICtrlRead($Checkbox_2), $GUI_CHECKED) = $GUI_CHECKED Then
$result = _WaitForImagesSearch($pictures, $waitTime, 0, $x, $y, 0, 0)
if $result > 0 Then
Send("5")
Sleep(100)
Else
ToolTip("")
EndIf
EndIf
If BitAND(GUICtrlRead($Checkbox_3), $GUI_CHECKED) = $GUI_CHECKED Then
$result = _WaitForImagesSearch($pictures, $waitTime, 0, $x, $y, 0, 0)
if $result > 0 Then
Send("6")
Sleep(100)
Else
ToolTip("")
EndIf
EndIf
WEnd
EndFunc ;==>_Start