I have try all night to make a tab key work...
here the code;
**********************************************
$title = "Element Client"
$game=WinActivate($title, "")
WinSetOnTop($title, "", 0)
Sleep(1000)
$red = "0xFF0000"
search_mob()
func search_mob() ; fonction "search_mob"
Send("{TAB}")
Sleep(1000)
EndFunc
While 1 ; begin of while unlimit
$Coord=PixelSearch ( 0, 0, 271, 62, $red, 5, 0 ) ;0xFF000 is red
$mob = @error
If $mob=0 Then ;if color isnt red do this
Sleep (1000) ;wait 1 sec
search_mob() ; go get the fonction "search_mob"
Else ;if color is red, do this
Sleep (1000) ;wait 1sec
Send ("{ALTDOWN}") ; press ALT DOWN
Send ("{1}") ; press 1
Send ("{ALTUP}") ; release ALT UP
Sleep (500) ; wait half seconde
EndIf ;end of if fonction
WEnd ; end of while fonction
************************************************** *******
Can you tell me what i miss???
all i want is to change the mob by using Tab key when this mob is dead.
it's work once. if i want to get it to work again, i have to press tab key and the rest do the job.
and do i have to use Injection to get tab key work?? everything working fine.
thx
edit: i just change from french to english, maybe someone could help me out...i stil testing this little script... btw this is not a REAL boting...it's just a bot to lvl up a pet in ROOM 4. i have other script that work with timer, and i would like to use with mob health, that all.






