ttt480 Posted November 29, 2017 Share Posted November 29, 2017 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 More sharing options...
water Posted November 29, 2017 Share Posted November 29, 2017 Welcome to AutoIt and the forum! What have you tried so far? We do not spoon feed users here, we teach them to fish Earthshine 1 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 Link to comment Share on other sites More sharing options...
ttt480 Posted November 29, 2017 Author Share Posted November 29, 2017 water, The finished script is not necessary. Give me an idea. Link to comment Share on other sites More sharing options...
Earthshine Posted November 29, 2017 Share Posted November 29, 2017 _FileToArray work? My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
water Posted November 29, 2017 Share Posted November 29, 2017 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 Link to comment Share on other sites More sharing options...
ttt480 Posted November 29, 2017 Author Share Posted November 29, 2017 Maybe. I'm not an expert in Autoit. How to use "_FileToArray" in my case ? Link to comment Share on other sites More sharing options...
Earthshine Posted November 29, 2017 Share Posted November 29, 2017 (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 November 29, 2017 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 29, 2017 Moderators Share Posted November 29, 2017 @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 Earthshine 1 "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 More sharing options...
ttt480 Posted November 29, 2017 Author Share Posted November 29, 2017 JLogan3o13, Only the example is apples and pears. Just want to count the number of certain symbols (in this case apples). Link to comment Share on other sites More sharing options...
Developers Jos Posted November 29, 2017 Developers Share Posted November 29, 2017 Why use apples when you really want to use something else? Jos Earthshine 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 29, 2017 Moderators Share Posted November 29, 2017 (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 November 29, 2017 by JLogan3o13 Earthshine 1 "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 More sharing options...
ttt480 Posted November 29, 2017 Author Share Posted November 29, 2017 Jos Well. In reality - I want to count the red circles with a line in the middle. Just apples - more clear to people. So I asked for apples, to make people understand. 1.bmp Example.bmp Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 29, 2017 Moderators Share Posted November 29, 2017 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 More sharing options...
Earthshine Posted November 29, 2017 Share Posted November 29, 2017 (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 November 29, 2017 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
ttt480 Posted November 29, 2017 Author Share Posted November 29, 2017 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). Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 29, 2017 Moderators Share Posted November 29, 2017 @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 More sharing options...
Moderators JLogan3o13 Posted November 29, 2017 Moderators Share Posted November 29, 2017 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 More sharing options...
Earthshine Posted November 29, 2017 Share Posted November 29, 2017 (edited) sorry. hey are MVP's mods too? I kind of figured Jos was because he's developer Edited November 29, 2017 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
ttt480 Posted November 29, 2017 Author Share Posted November 29, 2017 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. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 29, 2017 Moderators Share Posted November 29, 2017 @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? Earthshine 1 "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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now