Coder Social home page Coder Social logo

Comments (11)

DanielHarrod avatar DanielHarrod commented on May 20, 2024

from appteststudio.

thorrenat avatar thorrenat commented on May 20, 2024

Hi Daniel,

Thanks fot this complete explanation, unfortunately example pictures were not loaded.
I will try all your proposals as soon as possible, and give you feedback.

Keep in touch

from appteststudio.

DanielHarrod avatar DanielHarrod commented on May 20, 2024

Hi R,

That's great you have been able to figure it out. There's quite a bit of
cool functionality in ATS. Including script design.

I have a video in the works to cover many aspects of the functionality and
script design. But it's a few weeks out.

Here's a couple hints on object search that should get you running.

Threshold is the relationship between the source and target image, each
threshold will be different, because it's relative to the images being
compared. Since it works at the individual RBG channel level, it's almost
impossible to figure it out without using the Test button and tweaking it
so that it meets the threshold at an acceptable level.

The object search compares the two images, first it takes a screenshot,
then it crops the image (this is the area to search). Then it takes the
object and does math at every location on the image pixel by pixel and
compares each possible location. It takes the highest score it finds after
comparing every possible location, then checks to see if it meets the
Threshold. If it meets the threshold then....

If you have a click event directly under the object search, it will click
on the located image - centering the click event box size on that location
then click there.

Here's one
On this event, the gold chest floats inside this range it goes up and down
and scrolls left. So since it's only in that range, then I don't need to
check anywhere else.
image

Here's my action, The size of the click area is how wide the clicks will
be. Also since it's moving I have a -9 pixel offset.
image

It doesn't really matter where the box is, this is just configuring the
click area and offset. This one and the above one work the same.
image

AHH...but..What if you don't want to click on the object.
Instead you want to click somewhere else, here's the hack for that. (This
is an option I need to build into the properties, but I haven't had any
idea how to make it intuitive(ish)).

Here's how you do it (if you don't want to click on the object you searched
for).
Object Search Event
-> Event (empty or color/point)
-> Click Action

VS.

Object Search Event
-> Click Action

**** The most important part.
See the Object doesn't have the background included, that's because the
background changes on every level and when the level scrolls. And I don't
want the background in the calculation.
image

So this is:
image

Is not as good as this:
image

Object search takes considerably more CPU time to do the search than using
color/points, so if you can do it with color/point that would be ideal or
set the mask appropriately. (Also Mask isn't required)

Here's another example, This one I want to click "Buy" if it's on the
screen, and a few other icons, and scroll down the list, then scroll back
to the top if I don't take any actions.
First check that it's viable before doing object searches. That way it
won't run every time.
image

Then If I see Buy, Click it.
In the Village Group as it goes down the list, if it gets to the bottom, it
performs scrolling actions if there's nothing found.
image

Let me know if this helps,

Daniel

from appteststudio.

thorrenat avatar thorrenat commented on May 20, 2024

Hello Daniel,

I tried some of the described steps, I am getting an error message "The type initializer for 'OpenCvSharp.Mat' threw an exception" every time I test or run .

Any idea how to solve that?

Thanks

from appteststudio.

DanielHarrod avatar DanielHarrod commented on May 20, 2024

Hi thorrenat,

This is a tricky one, as I wasn't able to reproduce it on any workstation that I have.

The application is having difficulty loading the DLL's in the install directory under /dll/x64 and /dll/x86

You might try running ATS as an administrator
image

...or making sure that the logged in user has security on those folders.
image

The other alternative is to run ATS from source code (eg install visual studio, run it from source code)

from appteststudio.

thorrenat avatar thorrenat commented on May 20, 2024

Hi Daniel,

That may explain something, I don't have such a folder:
image

The only folder is C:/Program Files/App Test Stidio/App Test Studio/bin

But no dll folder (not even in hiding folders)

Installed version 1.0.0.14 from 16 Jun 2022
image

from appteststudio.

DanielHarrod avatar DanielHarrod commented on May 20, 2024

Sorry, I didn't mean to say dll folder, I meant the bin folder.
I think it's not finding the dll's here.
You can copy them to the folder where AppTestStudio.exe is located and it will find them.
image

After the copy.
image

Let me know if this works.

from appteststudio.

thorrenat avatar thorrenat commented on May 20, 2024

This definetely made it work!!!
Thanks for your time and dedication helping me here.

I want to invite you to a 6 pack or something, how can I compensate you for all this effort?

from appteststudio.

DanielHarrod avatar DanielHarrod commented on May 20, 2024

from appteststudio.

thorrenat avatar thorrenat commented on May 20, 2024

No, seriously, your patreon page is not working, how can I compensate you?

from appteststudio.

DanielHarrod avatar DanielHarrod commented on May 20, 2024

That's fixed too, I appreciate your support.

from appteststudio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.