Jump to content

Determine the number of copies picture on the screen


ttt480
 Share

Recommended Posts

Good evening.

Help to understand question.

On the screen is a picture (1.bmp), which shows 4 apples and 2 pears.

I have a picture of one Apple "Example.bmp".

How can the script determine how many copies of the image (from the image "Example.bmp") is on the screen ?

(Script needs to look at the picture "Example.bmp", counting how many copies of it is on the screen and generate the message - with the number found in the screen copies)

Example.bmp

1.bmp

Link to comment
Share on other sites

Welcome to AutoIt and the forum!

What have you tried so far?
We do not spoon feed users here, we teach them to fish ;)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

How should _FileToArray help in this case ??

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Get a list of images, or files into an array. Then you have the count and you could compare them was my idea

 

Sorry. I meant _FileListToArray

#include <Array.au3>
#include <File.au3>
#include <MsgBoxConstants.au3>

Local $aArray = _FileListToArray(@DesktopDir, '*.bmp', Default, True)
; Sort the array
_ArraySort($aArray) ; sorts ascemding by default
; display it if you want to or comment out next line as this is usually for debug purposes
_ArrayDisplay ($aArray)

now go compare your imgages and see how many you have.

Use the built in Help file for AutoIt and look up that function for samples.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

  • Moderators

@ttt480 are you really searching for pictures of apples and pears, or something else? Please explain in more detail what you are trying to do, what you have tried on your own, what application this is in, and what your desired end result would be. There may be multiple ways to skin this particular cat, depending on your answers. Help us help you ;)

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

So show a screenshot of the "certain symbols", and what are they contained in (application, web app, etc.). Again, having to pull teeth is not going to get you the help you seek

Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

Again, is this in a desktop application? If so which application? Is it in a webpage? If so which site?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

did you try what I posted? it will give you the count in element 0 of your array. you can compare the images using other methods you can look up in AutoIt. Set the path correctly to where you want to search for your images from.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

  • Moderators

@Earthshine if you see not one but two Moderators involved in a topic, please refrain from posting - there is usually a reason.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

Ok, paint editor is an application. So you're saying you have multiple instances of the paint editor open, or you're trying to count the number of "apples" in a single paint editor instance?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

@ttt480 So you have a script that does at least part of what you want already. Why would you go 19 posts into a thread without sharing that?! How about showing us what you have, so we can see what you're trying to do rather than asking us to guess?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...