Jump to content

Recommended Posts

Posted

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

Posted

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 2024-07-28 - Version 1.6.3.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 (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

 

Posted

How should _FileToArray help in this case ??

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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

 

Posted (edited)

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

 

  • Moderators
Posted

@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!

  • Moderators
Posted (edited)

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!

Posted (edited)

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

 

Posted
5 minutes ago, JLogan3o13 said:

and what are they contained in (application, web app, etc.).

No. This is not an app.

It's just a picture that is open on the desktop (Paint editor).

  • Moderators
Posted

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!

Posted (edited)

sorry. hey are MVP's mods too? I kind of figured Jos was because he's developer

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Posted

JLogan3o13

I mean:

The script makes the image of the entire screen, that is PrintScreen.

And analyzes the resulting screenshot.

Finds the Example picture, and outputs the message (Msg) on the number of these pictures.

  • Moderators
Posted

@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!

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
  • Recently Browsing   0 members

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