Hello everyone and thank you for allowing this awesome forum.
I'am trying to write a little bot here, for a mobile game in an emulator, you can see it in the image below.
[Only registered and activated users can see links. Click Here To Register...]
the idea is to drag every 2 similar items together so they merge.
So the way I've been thinking I should do this is as follow:
1. Make a library for every weapon by taking a screenshot then use paint.exe to change it to .bmp format (one time only).
2. Capture a snapshot of the game.
3. Image search one weapon at a time into the snapshot and store the coordinates of the similar weapons in an array.
4. Click and drag from coordinate[i] to coordinate[i+1] in the array till it's done.
5. Repeat #3 and #4 for each weapon in the library.
6. Once done, wait x minutes and go to #2.
Any better way to do it?
I can't use PixelSearch here, right? Because the location of the items is not fixed.
I started by testing the imageSearchEX function but it never finds the weapon in the game.
Any insights what could be the reason?
Ich bedanke Ihnen.
I'am trying to write a little bot here, for a mobile game in an emulator, you can see it in the image below.
[Only registered and activated users can see links. Click Here To Register...]
the idea is to drag every 2 similar items together so they merge.
So the way I've been thinking I should do this is as follow:
1. Make a library for every weapon by taking a screenshot then use paint.exe to change it to .bmp format (one time only).
2. Capture a snapshot of the game.
3. Image search one weapon at a time into the snapshot and store the coordinates of the similar weapons in an array.
4. Click and drag from coordinate[i] to coordinate[i+1] in the array till it's done.
5. Repeat #3 and #4 for each weapon in the library.
6. Once done, wait x minutes and go to #2.
Any better way to do it?
I can't use PixelSearch here, right? Because the location of the items is not fixed.
I started by testing the imageSearchEX function but it never finds the weapon in the game.
Code:
#RequireAdmin
#AutoIt3Wrapper_UseX64=NO
#include <imageSearchEX.au3>
$Win_Title = "(GrowStone)"
$Image_Path = @ScriptDir & "\Image_Lib\Donut.bmp"
$Image_Coordinates = imageSearchEX($Win_Title,$Image_Path)
If $Image_Coordinates <> 0 Then
MsgBox(0,"BINGO",$Image_Coordinates[0] & " " & $Image_Coordinates[1])
Else
MsgBox(0,"NICHTS","Image Not Found",50)
EndIf
Ich bedanke Ihnen.