
sending inputs in minimized window... hard for beginners?
Hi, im trying to learn scripting for a game i play,
i decided to try Autoit seems simple enough for a beginner
then i encountered a PROBLEM
it seems that sending input in an inactive window is impossible(?) for Autoit
if its not a window app(something about controlID)
my question is
will it be hard to do it on with macromonkey for a newbie?
oh and what do i have to look for if i want to record chat from games(chats not coming from me) or possibly assign variables to it?
i just dont know where to start on that one.
for key input i began with Send("{key}") in Autoit
check HP or mobs with pixel
but i have no idea where to start with getting chat logs
anyway this is what i made so far with autoit, i was supposed to paste it in their forums
but it seems they are not open to game automation T_T
this script could already locate, target and attack already with help of Pixel Search
still working on autopots though, the game's HP bar changes color to different shade of red
Code:
WinWaitActive ( "Forsaken World" )
HotKeySet("t","tee")
Opt("MouseCoordMode", 0) ;****is this the right place for this Opt
While 1;****dunno why i need this but it wont work without it
Sleep(100)
WEnd
Func tee();Start of Bot
$o = 0
Do ;First I check minimap for mobs
Opt("MouseCoordMode", 0)
$left = 1294 ;minimap coordinates
$right = 1294
$top = 640
$bottom = 640
For $i = 0 to 65 Step 1 ;*****i made this For so the pixel search would start at the my desired center and find the CLOSEST mob
$coord = PixelSearch( $left - $i, $top + $i, $right + $i, $bottom - $i, 0xF8F5FF)
If Not @error Then ;******the game got a autowalk function from the minimap after i get the coord i will move to positon by mouseclick
MouseClick("left", $coord[0], $coord[1], 1, 0)
$findtarget = 0
Do
Send("{TAB}") ;****Tab is the game Target key in the game so here i would send tab until i find one mob
;****i use Pixel search not sure if there is better alternative
$attack = PixelSearch( 235, 92, 348, 98, 0xA81C33, 20 )
If Not @error Then
$findtarget = 1
ExitLoop
EndIf
Sleep(500)
Until $findtarget = 1
$attacking = 1
Do
$HPpot = PixelGetColor( 190, 104) ;**** here the script is supposed to check HP/MP but i cant get it to work,
;*****since the game HP bar changes color to burning red when
If Not $HPpot == 854803 Then ;*****under attack i cant get a stable pixel on any HP bar spot
Send("9")
EndIf
$MPpot = Hex(PixelGetColor( 119, 105))
If Not $MPpot == 2242884 Then
Send("8")
EndIf
Send("1") ;the game got Skill queue and not that long CD so i just send my hotkeys to it
Send("2")
Send("3")
Sleep(1200)
$stopatt = PixelSearch( 235, 92, 348, 98, 0xA81C33, 20 ) ;here i check if the mob is still there
If @error Then
$attacking = 0
EndIf
Until $attacking = 0
ExitLoop
EndIf
Next
$o = $o + 1
Until $o = 19
EndFunc